Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 15 of 15

Thread: Moving an oval around the frame

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Moving an oval around the frame

    I have a problem. I'm trying to understand and learn Java for GUI but I'm stacked around a project. I had done some other "test app" but on this, I can't figure out what I had done. I can't move my circle around the pannel.... Can someone please take a look and explain where I had made some errors?

    Main class
    package main;
     
    // imports
    import javax.swing.JFrame;
    import java.awt.Dimension;
     
    public class Main{
     
    	public static final int WIDTH = 320;
    	public static final int HEIGHT = 240;
    	public static final int SCALE = 2;
     
    	// constructor
    	public Main(){
    		JFrame frame = new JFrame("Titolo");
    		frame.add(new Panel());					// add JPanel in JFrame
    		frame.setTitle("Asteroid");				// title of the window
    		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);		// close the app
    		frame.setSize(WIDTH * SCALE, HEIGHT * SCALE);			// size
    		frame.setPreferredSize(new Dimension(WIDTH * SCALE, HEIGHT * SCALE));
    		frame.pack();
    		frame.setLocationRelativeTo(null);		// position >> center of screen
    		frame.setVisible(true);					// show the window
    		frame.setResizable(false);				// not resizable
    	}
     
    	// main class
    	public static void main(String[] args){
    		new Main();						// call again the class to read constructor
    	}
    }

    JPanel class
    // JPanel class for graphic
     
    package main;
     
    // imports
    import javax.swing.JPanel;
    import javax.swing.Timer;
     
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Color;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
     
     
    public class Panel extends JPanel implements ActionListener{
     
    	// variables
    	int W = Main.WIDTH * Main.SCALE;
    	int H = Main.HEIGHT * Main.SCALE;
     
    	// player ship
    	Player player;
    	public int playerX = W / 2;
    	public int playerY = H / 2;
     
    	// timer
    	Timer mainTimer;
     
    	// constructor
    	public Panel(){
    		setFocusable(true);
    		mainTimer = new Timer(10, this);
     
    		player = new Player(playerX, playerY);
    		addKeyListener(new KeyAdapt(player));
     
    		mainTimer.start();
    	}
     
    	public void paint(Graphics g){
    		super.paint(g);
    		// background
    		Graphics2D g2d = (Graphics2D) g;
    		g2d.setColor(Color.gray);
    		g2d.fillRect(0, 0, Main.WIDTH * Main.SCALE, Main.HEIGHT * Main.SCALE);
     
    		//player
    		player.draw(g2d);
     
    	}
     
    	public void actionPerformed(ActionEvent e) {		// needed for ActionListener
    		player.update();
    		repaint();
     
    	}
    }

    Key adapter class
    package main;
     
    //imports
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
     
    public class KeyAdapt extends KeyAdapter{
     
    	Player pl;			// create object of player
     
    	// constructor
    	public KeyAdapt(Player player){
    		pl = player;
    	}
     
    	public void KeyPressed(KeyEvent e){
    		pl.KeyPressed(e);
    	}
     
    	public void KeyReleased(KeyEvent e){
    		pl.KeyReleased(e);
    	}
     
    }

    Player class
    package main;
     
    import java.awt.Color;
    // imports
    import java.awt.Graphics2D;
    import java.awt.event.KeyEvent;
     
    public class Player extends Entity{
     
    	// variables
    	int velX = 0;
    	int velY = 0;
    	int speed = 5;
     
    	/* ship shape polygon
    	int xShip[] = {24,0,4,0};
    	int yShip[] = {10,2,10,18};
    	int p = 4;
     
    	Polygon ship = new Polygon (xShip, yShip, p);
    	*/
    	// constructor
    	public Player(int x, int y){
    		super (x, y);
     
    		// ship.translate(x, y);		// for polygon ship
    	}
     
    	public void update(){
    		x_pos += velX;
    		y_pos += velY;
    	}
     
    	// drawing method
    	public void draw(Graphics2D g2d){
    		g2d.setColor(Color.black);
     
    		g2d.fillOval(x_pos, y_pos, 15, 15);
    		// g2d.drawPolygon(ship);		// for polygon ship
    	}
     
    	// keyboard controls
    	public void KeyPressed(KeyEvent e){
    		int key = e.getKeyCode();
     
    		if(key == KeyEvent.VK_UP){System.out.println("UP\n");};
    		/*
    		if (key == KeyEvent.VK_UP){velY = - speed;};
    		if (key == KeyEvent.VK_DOWN){velY = + speed;};
    		if (key == KeyEvent.VK_LEFT){velX = - speed;};
    		if (key == KeyEvent.VK_RIGHT){velX = + speed;};
    		*/
    	}
     
    	public void KeyReleased(KeyEvent e){
    		int key = e.getKeyCode();
     
    		if (key == KeyEvent.VK_UP){velY = 0;};
    		if (key == KeyEvent.VK_DOWN){velY = 0;};
    		if (key == KeyEvent.VK_LEFT){velX = 0;};
    		if (key == KeyEvent.VK_RIGHT){velX = 0;};
    	}
    }

    Entity class
    package main;
     
    // imports
    import java.awt.Graphics2D;
     
    public class Entity{
     
    	// variables
    	int life;					// vita delle unit�
    	int x_pos;
    	int y_pos;
     
     
    	// constructor
    	public Entity(int x, int y){
    		this.x_pos = x;
    		this.y_pos = y;
    	}
     
    	public void update() {
     
    	}
     
    	public void draw(Graphics2D g2d) {
     
    	}
    }

    If you have some suggestion it will be very appreciated.


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    That's a lot of code to practice moving an object around a JPanel. You should write a simple, short example that paints a shape on a JPanel at specific coordinates and then moves around by changing the coordinates. Once you've gotten that figured out (ask for help if you need it), add the other bells and whistles you want.

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Moving an oval around the frame

    Yeah, you are right. I will delete all and restart again

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    You shouldn't have to delete anything. Start a new program as a learning exercise to practice the basics required to do one or two specific things: draw an object, make it move. Come here with the code when you need help with it.

  5. #5
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Moving an oval around the frame

    Ok, I think the problem is that I haven't really worked with multy class a lots so.... I need to understand WHERE to call a certain thing like JPanel, KeyAdapter, etc.

    I had made 3 separate classes, Main, JPanel and KeyAdapter. I have an oval but I can't move it. Maybe I don't know how to start the keyadapter or I had made some mistakes on where I had placed the variables of the position of the oval... don't know. I haven't problem if I work on a single class, non problem at all. But with multi class yes....

    Main
    package main;
     
    // imports
    import javax.swing.JFrame;
     
     
    public class Main extends JFrame{
     
    	// variables
     
    	// constructor
    	public Main(){
    		JFrame frame = new JFrame();
    		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     
    		frame.setTitle("Movements test");
    		frame.setLocationRelativeTo(null);
    		frame.setSize(250, 250);
    		frame.setResizable(false);
    		frame.setVisible(true);
     
    		frame.add(new Panel());				// create JPanel instance
    		frame.addKeyListener(new Keys());	// create KeyListener instance
    	}
     
    	public static void main(String[] args){
    		new Main();
    	}
    }

    JPanel
    package main;
     
    // imports
    import javax.swing.JPanel;
     
    import java.awt.Graphics;
    import java.awt.Color;
     
    public class Panel extends JPanel{
     
    	// variables of the oval graphic
    	int x = 125;
    	int y = 125;
     
    	// constructor
    	public Panel(){
     
    	}
     
    	public void paint(Graphics g){
    		g.setColor(Color.gray);
    		g.fillRect(0, 0, 250, 250);
     
    		g.setColor(Color.white);
    		g.fillOval(x, y, 15, 15);
    	}
     
    	// modificators
    	public void modX(int n){
    		n = x;
    	}
     
    	public void modY(int n){
    		n = y;
    	}
    }

    KeyAdapter class
    package main;
     
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
     
    public class Keys extends KeyAdapter{
     
    	Panel pane = new Panel();		// access to Panel class
     
    	// constructor
    	public Keys(){
     
    	}
     
    	public void KeyPressed(KeyEvent k){
    		int key = k.getKeyCode();
     
    		if (key == KeyEvent.VK_UP){pane.y = pane.y - 1;};
    		if (key == KeyEvent.VK_DOWN){pane.y = pane.y + 1;};
    		if (key == KeyEvent.VK_LEFT){pane.x = pane.x - 1;};
    		if (key == KeyEvent.VK_RIGHT){pane.x = pane.x + 1;};
    	}
     
    	public void KeyReleased(KeyEvent k){
    		int key = k.getKeyCode();
    	}
    }

    Where is the problem?

  6. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    It's good to have the additional detail of your assessment of the problem and how you got there. Since you're having difficulty moving from single class to multi-, do you have the single-class version of the multi-class program you've now posted? If so, post that. If not, I recommend you practice incremental development using a versioning system or some other process that lets you back up to a previous version. Don't throw code away that works or continue to add stuff to it until it breaks without the ability to recover to a working version. That will save you tons of time and frustration and will allow you to repeat the same exercise until you get it right.

    While you mull that over, I'll look at what you posted to see if I can find the problem.

    Edit: Have you read the "How to Write a Key Listener" tutorial?

    Your biggest area of misunderstanding is this statement and comment in Keys:

    Panel pane = new Panel(); // access to Panel class

    This statement creates a NEW instance of Panel, NOT the same instance as the one already added to the JFrame, but a different one. Think about how you could pass the instance of Panel needed to Keys so that you're drawing on the correct instance.

    Hints: Setter method or pass through constructor.

    Your next biggest mistake is that by convention Java method names begin with lowercase letters. Using @Override annotations will help you find these errors when you forget.

  7. #7
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Moving an oval around the frame

    Oh... yeah.. when I se ... = new class_name it's mean to creato e NEW istance... not the same. I'm loosing myself into a glass of water. But still not working... this is the third day that I'm stack on this... Implement the keys are a problem for me. Some edits that I had tried to fix the problem but...

    Main
    ....
    ...
    public class Main extends JFrame{
     
    	// variables
     
    	// constructor
    	public Main(){
    		JFrame frame = new JFrame();
    		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     
    		frame.setTitle("Movements test");
    		frame.setLocationRelativeTo(null);
    		frame.setSize(250, 250);
    		frame.setResizable(false);
    		frame.setVisible(true);
    		[B]frame.setFocusable(true);                            // ADD because I use KeyTyped in Keys class[/B]
     
    		frame.add(new Panel());				// create JPanel instance
    		frame.addKeyListener(new Keys());	                // create KeyListener instance
    ....
    ....

    Panel
    public class Panel extends JPanel{
     
    	// variables of the oval graphic
    	int x = 125;
    	int y = 125;
     
    	[B]int xMod, yMod;[/B]        // for setters
     
    	// constructor
    	public Panel(){
    	[B]	move();                  // mmmm, not sure but... it's not change anything
    	}[/B]
     
    	[B]public void move(){
    		x += xMod;
    		y += yMod;
    	}[/B]
     
    	public void paint(Graphics g){
    		g.setColor(Color.gray);
    		g.fillRect(0, 0, 250, 250);
     
    		g.setColor(Color.white);
    		g.fillOval(x, y, 15, 15);
    	}
     
    	[B]// setters
    	public void modX(int n){
    		xMod = n;
    	}
     
    	public void modY(int n){
    		yMod = n;[/B]
    	}
    }

    KEYS
    public class Keys extends KeyAdapter{
     
    [B]	Panel panel;		// access to the Panel class not a new instance[/B]
     
    	// constructor
    	public Keys(){
     
    	}
     
    [B]	public void KeyTyped(KeyEvent k){                     // KeyTyped instead of KeyPressed because I'm working with
    		int key = k.getKeyCode();                          // KeyCode on THIS line
     
    		if (key == KeyEvent.VK_UP){panel.modY(-1);};
    		if (key == KeyEvent.VK_DOWN){panel.modY(1);};
    		if (key == KeyEvent.VK_LEFT){panel.modX(-1);};
    		if (key == KeyEvent.VK_RIGHT){panel.modX(1);};
    	}[/B]
     
    }

  8. #8
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    Other thoughts:

    I would add the KeyListener to the Panel instance.

    You should be overriding the paintComponent() method in Panel and not Paint().

    The method names in Keys should begin with lowercase letters.

    panel in Keys is still not the same instance as the panel added to the JFrame.

    The x/y coordinates in panel should not be accessed directly but through setter methods.

    repaint() should be called on the panel after the oval coordinates are updated.

  9. #9
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Moving an oval around the frame

    =(
    I had removed repaint(). the program manage x and y trought setters, but I don't understand how can I make work the KeyAdapter with Panel

  10. #10
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    Okay. The changes I made are relatively minor but critical to getting it to function as desired. Let me know if you have any questions:

    Main:
    // imports
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
     
    public class Main extends JFrame
    {
        // constructor
        public Main()
        {
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     
            frame.setTitle("Movements test");
            frame.setLocationRelativeTo(null);
            frame.setSize(250, 250);
            frame.setResizable(false);
            frame.add( new Panel() );
            frame.setVisible(true);
     
        } // end constructor
     
        // a main() method to launch the app on the EDT
        public static void main(String[] args)
        {
            SwingUtilities.invokeLater( new Runnable()
            {
                public void run()
                {
                    new Main();
                }
            } );
        }
    }

    Panel:
    // imports
    import javax.swing.JPanel;
     
    import java.awt.Graphics;
    import java.awt.Color;
     
    public class Panel extends JPanel
    {
        // instance variables of the oval graphic
        int x = 125;
        int y = 125;
        Keys keys;
     
        // constructor
        public Panel()
        {
            // create an instance of Keys
            keys = new Keys();
            // pass a reference to this Panel to keys
            keys.setPanel( this );
            // add the key listener to the panel
            addKeyListener( keys );
            // make sure that it can be set focusable
            setFocusable( true );
            // request focus
            requestFocusInWindow();
        }
     
        // note that this is paintComponent() not paint()
        @Override
        public void paintComponent(Graphics g)
        {
            // clears the component and does other housekeeping
            super.paintComponent( g );
     
            g.setColor(Color.gray);
            g.fillRect(0, 0, 250, 250);
     
            g.setColor(Color.white);
            g.fillOval(x, y, 15, 15);
        }
     
        // modificators
        public void modX(int n){
            n = x;
        }
     
        public void modY(int n){
            n = y;
        }
     
    }

    Keys:
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
     
    public class Keys extends KeyAdapter
    {
        // an instance variable that will be used
        // to access to Panel class
        Panel panel;
     
        // default constructor
        public Keys()
        {
            // unused
        }
     
        // note the name of this method
        @Override
        public void keyPressed(KeyEvent k){
            int key = k.getKeyCode();
     
            if (key == KeyEvent.VK_UP){panel.y -= 5;};
            if (key == KeyEvent.VK_DOWN){panel.y += 5;};
            if (key == KeyEvent.VK_LEFT){panel.x -= 5;};
            if (key == KeyEvent.VK_RIGHT){panel.x += 5;};
     
            // repaint the panel after changing the coordinates
            panel.repaint();
        }
     
        // a method to pass an instance of the panel
        public void setPanel( Panel panel )
        {
            this.panel = panel;
        }
    }

  11. #11
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Moving an oval around the frame

    I see a lots of thing semi-new to me. Nothing that I haven't seen before like SwingUtilities but I never used them. Mmmm... Alone, I don't know how to creato a simple window and move a circle or oval inside it. Bad... I try to understand from internet, but I had learned from old videos and now I'm totaly confused. I had seen something like... 10-12 methods to build up simple animation in a panel and all different.. mmm...Do you know where I can get some good or valid help (videos, books or something) about gui creation, animation or simple games like asteroid or something else? I want only to learn wimple thing for now, I'm not asking for 3d, absolutely.

  12. #12
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    What don't you understand about the working code I posted? Or is that fine, but now you're thinking about the next step? If you're thinking about the next step, let's start with code you understand - like the code I just posted - and modify it a small bit at a time.

    So, if you think you understand the code I just posted, what would you like it to do next? If you don't understand it or have any questions, ask.

  13. #13
    Junior Member
    Join Date
    Jan 2014
    Posts
    7
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Moving an oval around the frame

    Mmm, lets say that I'm really confused about "the right way" if I can say. As I said, I had learned the basic of java, and it's ok I think. I had made some "programs", let's say only utilities for my pc at the workplace. But all in console mode ok? Never touched guis, or something graphical. So I had downloaded tons of "tutorial" from youtube where someone build up games like pacman, asteroid, tetris etc. The logical part it's simple, like to variables, fork cicles, etc. The only thing that I can't understand are the graphic part. Every one seems to have it's own way to build a frame/panel and to "draw" something on it. And the one that you use it's new to me. It's really seems that are tons of way to do the same thing like create a window and animate something. Now I try to understand which one is better / simple. I have not found a book or a webpage where I can learn something about this. JavaDocs are awesomely hard to understand, and I'm not the first to say it. So... mm, now don't know. Maybe I need to clean out all of what I had "learned" and start again from the begin.

    Let's take the main class. You import SwingUtilities... and IT'S SEEMS that you use it to create a sort of "thread" where you have a run() method. Am I right?
    In the Panel() you reserve a name of Keys() object, named "keys" and it's ok. Then you use something new for me, the keys.setPanel(this). It's easy to understand that you call a method from the Keys() class and I can see it. But I don't fully understand it.

    public void setPanel( Panel panel )
        {
            this.panel = panel;
        }

    A method named "setPanel" ok, that must have an argument named "panel" and it's a "Panel type". Ok... so, I think that it's mean that I must first create an object of the Panel class isn'it? And I can see on the topo of the same Keys class <<Panel panel;>>. Ok. It's a little... hard / tricky for me. I can see that the method is waiting to know which "Panel" will call this method and I can see that in the Panel class there is a call but... it's a little hard to go all through this and understand that it's a "chain" that link the Keys class to the Panel class... may I need to find some other example of this.

    The last two things that I don't understand are the <<palle.repaint();>> and paintComponent.
    While not use simply paint()? I had seen a lots of users to use paint with Graphics or Graphics2D, but never paintComponent. I think that is a component of JPanel, isn't it?
    panel.repaint(). I can't understand while it's in the Keys class.

  14. #14
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    I'll address your comments near the end later when I have more time, about 3 hours from now. In the meantime, please work through this excellent article/tutorial, Performaing Custom Painting. Work through the whole tutorial, type out, compile and run the examples, study them until you understand them. If you have questions about that tutorial, we'll address those next.

  15. The Following User Says Thank You to GregBrannon For This Useful Post:

    javacon (February 4th, 2014)

  16. #15
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Moving an oval around the frame

    "The right way:" There are many "ways." Some are better than others. Some ways are technically "wrong" but will work anyway, most of the time. Other ways are just plain wrong because they don't work, ever. As a beginner in GUIs, don't worry so much about always doing everything the right way or even knowing the right way from the wrong way that still works. Learn them all, practice them all, and as you gain that experience and study the differences, you'll learn why the right way is right, the better way is better, the wrong way that works is still wrong, and how to avoid the wrong way that just plain doesn't work. The more you know the better. Cleaning out what you know and starting over is not only silly, it's impossible. We learn more from our mistakes than our faultless efforts.

    No, you won't find a tutorial, web page, or video that shows you every way to do something and then tells you which is best, right, wrong, etc. You'll have to try all of those ways and figure it out, and if you work at it long and hard enough, you will.

    Java Docs: You need to spend more time with them to become more familiar with them and confident in their understanding and usage. Ask questions if you need help, but you need to put forth the effort to thoughtfully study them until you mostly understand them. They are not that hard. Telling yourself they are "hard" to avoid them is an immature technique that will prevent you from being a better programmer. Finding others who agree that something is difficult is easy. Get over it and move past those people.

    The parts of the Main class you say you don't understand indicate that your OOP skills are weak. GUI programming requires a strong understanding of OOP principles and practices. There's no magic to acquiring this understanding other than study and practice, lots of it. Slow down and back up a bit. Improve your understanding of OOP basics. That you don't understand or even recognize mutator/accessor (getter/setter) methods suggests your study has not been structured, that you've bounced around, studying various topics without getting a firm foundation, and have jumped too quickly to more advanced topics like GUI programming.

    Working through the tutorial at the link I provided should answer your questions in the last paragraph, but you'll need to practice that code over and over again to understand it well.

    Good luck, keep studying, keep coding, and practice, practice, practice.

  17. The Following User Says Thank You to GregBrannon For This Useful Post:

    javacon (February 5th, 2014)

Similar Threads

  1. [SOLVED] Error while moving the tiles in frame
    By weirddan in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 17th, 2014, 05:42 PM
  2. java: need help to rotate an oval please
    By xzibit_lax in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 23rd, 2013, 08:34 AM
  3. Replies: 1
    Last Post: January 19th, 2012, 03:44 PM
  4. So im making a freehand Line,Rect,Oval; but problems
    By Matta in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 20th, 2011, 07:25 AM
  5. Getting a red Oval to displayed on screen
    By warnexus in forum What's Wrong With My Code?
    Replies: 8
    Last Post: January 13th, 2011, 08:27 PM