Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Re: How to retain Graphics after resizing java applet

    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...
  2. Re: How to retain Graphics after resizing java applet

    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...
  3. Re: How to retain Graphics after resizing java applet

    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...
  4. Re: How to retain Graphics after resizing java applet

    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...
Results 1 to 4 of 4