-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2, 5.0
-
b37
-
x86
-
windows_nt, windows_xp
Name: jk109818 Date: 05/07/2003
FULL PRODUCT VERSION :
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Windows NT Version 4.0
A DESCRIPTION OF THE PROBLEM :
JTree does not paint "focused" node correctly. If focus is on a JTree control, and a node is selected, a yellow dotted line should be painted around the node, but it is not.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Execute the program below.
2) Select a node on a tree by clicking on a node
3) Observe that yellow focus border is not painted
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected yellow dotted line to be painted around "focused" JTree node.
ACTUAL -
Yellow dotted line was not painted around "focused" JTree node.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package focustest;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FocusTest
{
public static void main(String[] args)
{
// set windows look and feel
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception exc)
{
}
JFrame frame = new JFrame("Test");
JTree tree = new JTree();
frame.getContentPane().add(new JScrollPane(tree));
JButton button = new JButton("OK");
frame.getContentPane().add(button, BorderLayout.SOUTH);
frame.setSize(500, 500);
frame.setVisible(true);
tree.requestFocus();
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}
}
---------- END SOURCE ----------
Release Regression From : 1.4.1_02
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 185276)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b19)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b19, mixed mode)
FULL OS VERSION :
Windows NT Version 4.0
A DESCRIPTION OF THE PROBLEM :
JTree does not paint "focused" node correctly. If focus is on a JTree control, and a node is selected, a yellow dotted line should be painted around the node, but it is not.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Execute the program below.
2) Select a node on a tree by clicking on a node
3) Observe that yellow focus border is not painted
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Expected yellow dotted line to be painted around "focused" JTree node.
ACTUAL -
Yellow dotted line was not painted around "focused" JTree node.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package focustest;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class FocusTest
{
public static void main(String[] args)
{
// set windows look and feel
try
{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
catch (Exception exc)
{
}
JFrame frame = new JFrame("Test");
JTree tree = new JTree();
frame.getContentPane().add(new JScrollPane(tree));
JButton button = new JButton("OK");
frame.getContentPane().add(button, BorderLayout.SOUTH);
frame.setSize(500, 500);
frame.setVisible(true);
tree.requestFocus();
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}
}
---------- END SOURCE ----------
Release Regression From : 1.4.1_02
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
(Review ID: 185276)
======================================================================
- duplicates
-
JDK-4917952 JTree node focus border not clear in Windows LnF
-
- Closed
-
-
JDK-4979389 The Lead border is not visible while traversing the JTree nodes in windows LAF.
-
- Closed
-
- relates to
-
JDK-6225504 REGRESSION: deselecting node in JTree throws NPE.
-
- Resolved
-
-
JDK-4894420 Windows L&F: JList/JTable focus outline should use complement color
-
- Resolved
-