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

inactive Text field with MetalTextFieldUI

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.1.6, 1.3.0
    • client-libs
    • beta
    • generic, x86
    • generic, windows_nt



      Name: vi73552 Date: 04/06/99


      it's impossible in metal LAF to change the backgroung color
      of a 'Non editable' Textfield. Why ??? it's really annoying !

      private void editableChanged(JComponent c, boolean editable) {
        Color background = c.getBackground();
        if (editable == false) {
          if (background instanceof UIResource) {
            c.setBackground(UIManager.getColor("control"));
          }
        } else {
          if (background instanceof UIResource) {
            c.setBackground(UIManager.getColor("TextField.background"));
          }
        }
      }


      Why not add a new property "TextField.inactiveBackground" ?

      Thanx in advance for your support .
      (Review ID: 56567)
      ======================================================================

            tprinzing Tim Prinzing (Inactive)
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: