Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4200976

BasicColorChooserUI doesn't properly handle custom preview panel

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.0
    • client-libs
    • merlin
    • generic, sparc
    • generic, solaris_2.6



      Name: diC59631 Date: 01/06/99


      Addition -- calling colorChooser.setUI(colorChooser.getUI());
      corrects the problem of having to add my own change listener.

      ----

      If I install a custom preview panel to a JColorChooser, it is never notified of changes to the ColorSelectionModel. It looks like the
       source for BasicColorChooserUI does the notification automatically (calling JComponent.setForeground() on the panel). However, I
      have to add my own ChangeListener to the ColorSelectionModel in order for my panel to be notified.

      Work around includes sample program. Comment out the addChangeListener line to see problem.
      (Review ID: 48981)
      ======================================================================

            mdavidsosunw Mark Davidson (Inactive)
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: