Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: JColorChooser

    by Norm
    Replies
    8
    Views
    1,393

    [SOLVED] Re: JColorChooser

    The new object b that is created is not the one being shown. You need to get access to the component that is currently being shown.
  2. Thread: JColorChooser

    by Norm
    Replies
    8
    Views
    1,393

    [SOLVED] Re: JColorChooser

    You need to use a reference to the component class that contains the repaint() method to call it:
    refToClassWithRepaint.repaint();

    The AddColor class does not have a repaint() method.
  3. Thread: JColorChooser

    by Norm
    Replies
    8
    Views
    1,393

    [SOLVED] Re: JColorChooser

    Calling the repaint() method in the paintComponent() method doesn't make sense. I think it could cause a tight loop. The repaint() method tells the JVM to call the painting methods.
    Call the...
  4. Thread: JColorChooser

    by Norm
    Replies
    8
    Views
    1,393

    [SOLVED] Re: JColorChooser

    After you do something that you want to cause the paintComponent() method to be called, call the repaint() method to tell the JVM to call paintComponent()
Results 1 to 4 of 4