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

SplitPane with Border does not close divider properly

XMLWordPrintable

      J2SE Version (please include all output from java -version flag):
       java version "1.6.0-beta2"
       Java(TM) SE Runtime Environment (build 1.6.0-beta2-b75)
       Java HotSpot(TM) Client VM (build 1.6.0-beta2-b75, mixed mode, sharing)

      Does this problem occur on J2SE 1.4.x or 5.0.x ? Yes / No (pick one)
       Yes

      Operating System Configuration Information (be specific):
       Microsoft Windows 2000 [Version 5.00.2195]

      Hardware Configuration Information (be specific):
       Pentium 4

      Bug Description:
        SplitPane with Border does not close divider properly
        When a SplitPane has a border and one attempts to close it to the
        bottom, it only goes as far down as it's top inset (it should go to it's
        bottom inset)

        - Run the code
        - Press the down arrow on the divider

      import static javax.swing.JFrame.*;
      import static javax.swing.JSplitPane.*;
      import javax.swing.*;

      public class Test {
        public static void main(String[] args) {
          JFrame frame = new JFrame();
          JSplitPane splitPane = new JSplitPane(VERTICAL_SPLIT, new
      JLabel("One"), new JLabel("Two"));
          splitPane.setDividerLocation(250);
          splitPane.setBorder(BorderFactory.createTitledBorder("Test"));
          splitPane.setOneTouchExpandable(true);
          frame.add(splitPane);
          frame.setSize(500, 500);
          frame.setVisible(true);
          frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
        }
      }

            Unassigned Unassigned
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: