//---------------------------------------------------------------------------- // // MovingEllipse.java // // written by: Simon Parsons // last modified: 3rd August 2012 // // Do some simple graphics --- draw an ellipse on the screen and move it about // import javax.swing.*; // Use the swing library public class MovingEllipse{ public static void main(String[] args){ JFrame frame = new JFrame("Watch it move!"); // Set up frame frame.getContentPane().add(new MovingGraphicsComponent()); // Create new component frame.setSize(400,400); // Set frame size frame.setVisible(true); // Make frame visible } }