| 
 Duplicate :   
 | 
|
| 
 Duplicate :   
 | 
|
| 
 Duplicate :   
 | 
|
| 
 Duplicate :   
 | 
|
| 
 Duplicate :   
 | 
|
| 
 Relates :   
 | 
|
| 
 Relates :   
 | 
|
| 
 Relates :   
 | 
|
| 
 Relates :   
 | 
FULL PRODUCT VERSION :
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b56)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b56, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Disabled JButtons have a black border around their edges when using the Windows XP look and feel.
It seems that the problem only manifests itself when I use the "Olive Green"
theme. If I use "Default (blue)" or "Silver", the problem isn't there. I
have uploaded a screenshot of the test program running under the three
themes that come with Windows XP.[1] Of them, only the Olive Green one
displays the black border.
[1] http://www.cse.ohio-state.edu/~eckenror/Java/Disabled%20Buttons.png<http://www.cse.ohio-state.edu/%7Eeckenror/Java/Disabled%20Buttons.png>
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Observe any disabled JButton in the Windows XP look and feel.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The button looks like it does in native apps and did in Tiger.
ACTUAL -
The button has a black border when disabled.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.UIManager;
public class Main {
    public static void main(String[] args) throws Exception {
        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        
        JFrame frame = new JFrame();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        
        JButton button = new JButton("Disabled Text");
        button.setEnabled(false);
        
        frame.add(button);
        frame.pack();
        frame.setVisible(true);
    }
}
---------- END SOURCE ----------
  |