-
Bug
-
Resolution: Fixed
-
P4
-
1.3.1_06, 1.4.1, 1.4.1_02, 1.4.2
-
b03
-
x86
-
windows_2000
-
Verified
Name: jk109818 Date: 05/09/2003
FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If a border is set for JTree with RTL orientation, a part of JTree will be displayed out of a container.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See the test case for detail.
Set the component orientation to RTL and set a border to JTree.
When JTree is displayed, it's not laid out properly.
ACTUAL -
The right-hand side of JTree is displayed out of a panel. When EmptyBorder is set, the more the value of left(the second argument) is enlarged, the more JTree will be laid out besides a panel.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.ComponentOrientation;
import javax.swing.*;
public class RTLJTreeWithBorder {
public static void main(String[] args) {
JFrame frame = new JFrame();
JTree tree = new JTree();
tree.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
tree.setBorder(BorderFactory.createTitledBorder("test"));
//tree.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
frame.getContentPane().add(tree);
frame.pack();
frame.show();
}
}
---------- END SOURCE ----------
(Review ID: 185443)
======================================================================
###@###.### 10/13/04 18:48 GMT
FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If a border is set for JTree with RTL orientation, a part of JTree will be displayed out of a container.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
See the test case for detail.
Set the component orientation to RTL and set a border to JTree.
When JTree is displayed, it's not laid out properly.
ACTUAL -
The right-hand side of JTree is displayed out of a panel. When EmptyBorder is set, the more the value of left(the second argument) is enlarged, the more JTree will be laid out besides a panel.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.ComponentOrientation;
import javax.swing.*;
public class RTLJTreeWithBorder {
public static void main(String[] args) {
JFrame frame = new JFrame();
JTree tree = new JTree();
tree.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
tree.setBorder(BorderFactory.createTitledBorder("test"));
//tree.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
frame.getContentPane().add(tree);
frame.pack();
frame.show();
}
}
---------- END SOURCE ----------
(Review ID: 185443)
======================================================================
###@###.### 10/13/04 18:48 GMT