What is this line of code supposed to do?
if(!initialoval)gm.drawOval(mainX,mainY,width,height);initialoval=true;
Why hide the statements like that?
Try debugging the code by adding...
Type: Posts; User: Norm
What is this line of code supposed to do?
if(!initialoval)gm.drawOval(mainX,mainY,width,height);initialoval=true;
Why hide the statements like that?
Try debugging the code by adding...
Your code doesn't draw the ovals when the paint method is called because the window has been resized or because of a call to repaint.
The paint method needs to control the drawing of the ovals on...
I don't understand why you are not using swing components. There are many benefits with them like double buffering to prevent flickering.
With the AWT components, you override the paint() method...
The paintComponent() method is defined in many swing components. You need to override it and add code as needed to draw your graphics.
Take a look at the tutorial:
Lesson: Performing Custom...