Glorfindal's Profile User Rating: -----

Reputation: 30 Craftsman
Active Posts:
566 (0.22 per day)
31-December 08
Profile Views:
Last Active:
User is offline Jan 27 2016 09:26 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   Glorfindal is currently writing a game with ASP and Microsoft Access (Database) called Dragon Craft

Posts I've Made

  1. In Topic: What are you working on today?

    Posted 26 Jan 2016

    I've been enjoying my snow days and learning how to create an android app.
  2. In Topic: [games design] openGL

    Posted 9 Nov 2014

    Unfortunately, I don't have any books to recommend for you, but there is a really good series of tutorials on the topic on YouTube. The guy who is doing the series is still making more episodes and does a very good job explaining the reasons for things which means it would be pretty easy for you to learn the core concepts and do something different on your own. His channel and videos are pretty unknown and he deserves a lot more attention. Here's a link to the first episode in the series.

    As of writing this there are currently 18 videos in the series and a new one comes out every Saturday. Hopefully this should be enough to help get you started. :)
  3. In Topic: Dealing with For Loops

    Posted 5 Nov 2014

    I fixed up your code. You had the right idea it was really just a few syntax errors and duplicate line problems. Some things to note. You do not put semi-colons after if-statements, also if an if statement only has one instruction in it you do not need to use curly braces, however if there is more than one line of code that is executed they are required. There may be times though in which there will only be one line of executable code inside an if-statement, but you will still need to use curly braces, for example in if-else statements. Hopefully this helps you, you seem to be doing well with the concepts you just need to work on your syntax. :)

    public class Lab6
            public static void main(String[] args)
            java.util.Scanner input = new java.util.Scanner(;
            int i;
            int sum=0;
            int gradeA = 0;
            int gradeB= 0;
            int gradeC= 0;
            int gradeD= 0;
            int gradeF= 0;
            double avg;
            System.out.print("Enter number of Students in the Class: ");
            int n = input.nextInt();
            for (i=1; i<=n; i++)
                    System.out.print("Enter an Exam Score: ");
                    int score = input.nextInt();
                    if(score >= 90) gradeA++;
                    if(score >= 80 && score < 90) gradeB++;
                    if(score >= 70 && score < 80) gradeC++;
                    if(score >= 60 && score < 70) gradeD++;
                    if(score < 60) gradeD++;
                    sum = sum+score;
            avg = (double)sum/n;
            System.out.println("The Average Exam Score Is: " + avg);
  4. In Topic: build a fan in java

    Posted 5 Nov 2014

    You need a timer that runs all the time and action listeners for the buttons. Inside of that timer you need to check if the fan is on and update it's position if it is and then it needs to redraw the screen. You can redraw the screen by calling the repaint() method. I did some of the code to help get you started but it is up to you to finish it. The below code runs a timer every 50ms (20 times a second) that updates the fan blade position if it the fan is turned on then redraws the screen. I'll let you implement the fan speeds yourself. :)/>
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    public class Fan extends JFrame implements ActionListener {
    	public static boolean fanOn = false;
    	public static int offSetFanBlades = 0;
    		setLayout(new BorderLayout());
    		Blades blades=new Blades();
    		JPanel controls=new JPanel();
    		JButton onoff = new JButton("ON/OFF");
    		controls.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
    		controls.add(new JButton("SLOW"));
    		controls.add(new JButton("MEDIUM"));
    		controls.add(new JButton("FAST"));
    	public static void main(String[] args)
    		Fan fan=new Fan();
    		fan.setTitle("NYCCT FAN");
    	public void actionPerformed(ActionEvent event) {
    		System.out.println("Fan toggled");
    		if(Fan.fanOn) {
    			Fan.fanOn = false;
    		} else {
    			Fan.fanOn = true;
    class Blades extends JPanel implements ActionListener {
    	Blades() {
    		Timer timer = new Timer(50, this);
    	protected void paintComponent(Graphics g){
    		int w=getWidth();
    		int h=getHeight();
    		int noOfBlades=5;
    		g.fillOval(20, 20, w-40, h-40);
    		for(int i=0;i<noOfBlades;i++)
    		g.fillArc(20,20,w-40,h-40,(int)(i*360./noOfBlades) + Fan.offSetFanBlades,(int)(360./(noOfBlades*3)));
    		g.drawString("Fan Blades: " + Fan.offSetFanBlades, 10, 10);
    	public void actionPerformed(ActionEvent arg0) {;
    		if(Fan.fanOn) {
    			if(Fan.offSetFanBlades == 360) {
    				Fan.offSetFanBlades = 0;
    			} else {
    				Fan.offSetFanBlades = Fan.offSetFanBlades + 5;
    			System.out.println("Fan Blades: " + Fan.offSetFanBlades);

    Also I took the liberty of fixing the indentions and adding some print line statements in your code. Hopefully that should make debugging it later easier.
  5. In Topic: How do tenure awards work?

    Posted 5 Nov 2014

    Okay that clears it up. Then I'll take the other years if it isn't too much work for you.

My Information

Member Title:
Java Enthusiast
Age Unknown
July 20
Playing Games, Creating Games, Playing Heroes of Ardania, Working on my Website, Hanging out with my friends and Playing Soccer
Years Programming:
Programming Languages:
HTML5, CSS, C++, Javascript, Classic ASP, PHP, Java

Contact Information

Website URL:
Website URL


Page 1 of 1
  1. Photo

    fromTheSprawl Icon

    06 Nov 2014 - 00:12
    Hey pal, how are you
  2. Photo

    fromTheSprawl Icon

    07 Jul 2013 - 19:37
    Dude! How is the game?
  3. Photo

    fromTheSprawl Icon

    13 Aug 2012 - 19:44
    Hey dude, glad to know you're still around. ^^
  4. Photo

    111027 Icon

    05 Jan 2012 - 15:30
    Haven't seen you around, mate.
  5. Photo

    fromTheSprawl Icon

    30 Nov 2011 - 19:21
    Hey there dude! How's things? The project? You can do it! ^^
  6. Photo


    29 Jun 2010 - 13:56
  7. Photo

    Glorfindal Icon

    06 May 2010 - 14:20
    what do you want the signature to say?
  8. Photo

    williamgeorgegardner Icon

    17 Feb 2010 - 11:39
    Can you do me one of those signatures just email me @ [email protected]
Page 1 of 1