JDK-4893784 : JTableHeader doesn't highlight column under mouse pointer
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2003-07-21
  • Updated: 2003-07-22
  • Resolved: 2003-07-22
Related Reports
Duplicate :  
Description

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) 
======================================================================