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

JTableHeader doesn't highlight column under mouse pointer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2
    • client-libs



      Name: rmT116609 Date: 07/21/2003


      FULL PRODUCT VERSION :
      java version "1.4.2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
      Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

      FULL OS VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      JTable should highlight column header which is under mouse pointer. Native Windows XP applications have such functionality, so current JAVA implementation of Windows LAF is inconsistent with native LAF.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Compile and run attached sample
      2. Move mouse pointer on some column header

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Column header should be highlighted according with current XP theme (small orange line at the bottom of header with default XP theme)
      ACTUAL -
      nothing happens

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;

      import javax.swing.*;
      import java.awt.*;
      import java.awt.event.WindowAdapter;
      import java.awt.event.WindowEvent;

      /**
       * @author Vladimir Kondratyev
       */
      public class Test {
        public static void main(String[] args) throws Exception{
          UIManager.setLookAndFeel(WindowsLookAndFeel.class.getName());
          JFrame frame = new JFrame();
          Container contentPane = frame.getContentPane();
          contentPane.setLayout(new BorderLayout());
          contentPane.add(new JScrollPane(new JTable(3, 3)), BorderLayout.CENTER);
          frame.addWindowListener(
            new WindowAdapter() {
              public void windowClosing(WindowEvent e) {
                System.exit(0);
              }
            }
          );
          frame.pack();
          frame.show();
        }
      }
      ---------- END SOURCE ----------
      (Incident Review ID: 190287)
      ======================================================================

            leifs Leif Samuelsson (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: