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

JTree with RTL (RIGHT_TO_LEFT) orientation doesn't layout Borders properly

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      x86
    • OS:
      windows_2000
    • Verification:
      Verified

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              svioletsunw Scott Violet (Inactive)
              Reporter:
              jkimsunw Jeffrey Kim (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: