URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13320>

                 Summary: swing: layout manager oscillates with nested
JSplitPanes
                 Project: classpath
            Submitted by: lindi
            Submitted on: Tue 06/07/05 at 15:44
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: None

    _______________________________________________________

Details:

Steps to reproduce:
1. Compile and run the attached testcase.

Expected results:
1. A window shows up. It has three areas that are separated by two horizontal
lines. First two areas have the height of three lines while the third can only
show two lines of the textarea.

Actual results:
1. A window shows up. It has three areas but the horizontal lines that are
supposed to separate the areas oscillate constantly up and down.

Testcase:
import javax.swing.*;
import java.awt.*;
public class jsplitpane extends JFrame {
        public static void main(String[] args) {
                (new jsplitpane()).show();
        }
        public jsplitpane() {
                JSplitPane pane1 = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
                JSplitPane pane2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
                pane1.setTopComponent(createTestPanel());
                pane1.setBottomComponent(pane2);
                pane2.setTopComponent(createTestPanel());
                pane2.setBottomComponent(createTestPanel());
                this.setContentPane(pane1);
                this.setSize(new Dimension(700, 200));
        }
        JPanel createTestPanel() {
                JPanel panel = new JPanel();
                JTextArea area = new JTextArea(5,5);
                area.setText("line1\nline2\nline3");
                panel.add(area);
                return panel;
        }
}


Note that the text is also bit misaligned but I'll submit another bug report
for that.






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13320>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Commit-classpath mailing list
Commit-classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/commit-classpath

Reply via email to