Search:

Type: Posts; User: Norm

Search: Search took 0.21 seconds.

  1. Replies
    8
    Views
    2,523

    [SOLVED] Re: JOptionPane problem

    Your code is still calling the JOptionPane from code within the paintComponent method.
    Move this line to the class level:
    double interval = Global.interval;
  2. Replies
    8
    Views
    2,523

    [SOLVED] Re: JOptionPane problem

    What is the "same" problem? I don't see an error message in your post?
    When you get an error, please copy and paste the full text here.
    To copy the contents of the command prompt window:
    Click on...
  3. Replies
    8
    Views
    2,523

    [SOLVED] Re: JOptionPane problem

    Make it a class variable that the paintComponent can see.
  4. Replies
    8
    Views
    2,523

    [SOLVED] Re: JOptionPane problem

    Move the call to JOptionPane outside of the paintComponent method.
    The paint method should only do the drawing. What it is to draw should be determined outside of paint and then repaint called which...
Results 1 to 4 of 4