Setting the Look&Feel for JButton also changes JComboBox

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.2.0
    • Component/s: client-libs



      Name: dbT83986 Date: 03/19/99


      The system is developed on Solaris 5.5.1 with Java JDK 1.2-V.
      It is runned on Netscape 4.5 with the Java 1.2 plug-in.

      I'm using a slightly modified version of the Metal Lok&Feel
      for my applet. When I set the backgroud and foreground colors
      of my JButton (code below) it also changes the colors of my
      JComboBox. When I try to reset the colors of my JComboBox, it
      changes the colors, but not the part of the JComboBox that is
      affected by the JButton changes.

      This is also important because it affects the buttons in the
      JOptionPane as well, which I don't have much control over.

      Would it be possible to change the colors of the JButton with a
      Look&Feel without changing the colors of the JComboBox?

      ... extends DefaultMetalTheme
      {
      public void addCustomEntriesToTable(UIDefaults table)
      {
        table.put("Button.background", Color.blue);
        table.put("Button.foreground", Color.white);
      }
      }
      (Review ID: 55826)
      ======================================================================

            Assignee:
            Mark Davidson (Inactive)
            Reporter:
            Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: