commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] [bug #13320] swing: layout manager oscillates with nested JS


From: Timo Lindfors
Subject: [commit-cp] [bug #13320] swing: layout manager oscillates with nested JSplitPanes
Date: Wed, 8 Jun 2005 18:42:11 +0000
User-agent: Elinks

Follow-up Comment #2, bug #13320 (project classpath):

Ok, the oscillation is now gone both in the reduced testcase and in a more
complex testcase. However, in the complex testcase one vertically split area
disappears completely after this fix.

The following more complex testcase is reduced from the user interface of the
omniscient debugger:

import javax.swing.*;
import java.awt.*;
public class jsplitpane extends JFrame {
        public static void main(String[] args) {
                (new jsplitpane()).show();
        }
        public jsplitpane() {
                JPanel topPanel = createTestPanel();
                topPanel.setLayout(new BorderLayout());
                getContentPane().add(topPanel);

                JSplitPane westPane1 = new
JSplitPane(JSplitPane.VERTICAL_SPLIT);
                JSplitPane westPane2 = new
JSplitPane(JSplitPane.VERTICAL_SPLIT);
                JSplitPane westPane3 = new
JSplitPane(JSplitPane.VERTICAL_SPLIT);
                JSplitPane centerPane1 = new
JSplitPane(JSplitPane.VERTICAL_SPLIT);
                JSplitPane centerPane2 = new
JSplitPane(JSplitPane.VERTICAL_SPLIT);
                centerPane1.setBottomComponent(centerPane2);
                JSplitPane splitPaneH = new
JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
                JSplitPane splitPaneH1 = new
JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
                topPanel.add(splitPaneH, BorderLayout.CENTER);
                splitPaneH1.setLeftComponent(westPane1);
                splitPaneH1.setRightComponent(centerPane1);
                splitPaneH.setLeftComponent(splitPaneH1);
                JPanel threadsPanel = createTestPanel();
                JPanel stackPanel = createTestPanel();
                JPanel localsPanel = createTestPanel();
                JPanel thisPanel = createTestPanel();

                westPane1.setTopComponent(threadsPanel);
                westPane1.setBottomComponent(westPane2);
                westPane2.setTopComponent(stackPanel);
                westPane2.setBottomComponent(westPane3);
                westPane3.setTopComponent(localsPanel);
                westPane3.setBottomComponent(thisPanel);

                JPanel codePanel = createTestPanel();
                centerPane2.setTopComponent(codePanel);
                JPanel tracePanel = createTestPanel();
                centerPane1.setTopComponent(tracePanel);
                JPanel TTYPanel = createTestPanel();
                centerPane2.setBottomComponent(TTYPanel);

                JPanel variablePanel = createTestPanel();
                splitPaneH.setRightComponent(variablePanel);
                this.setSize(new Dimension(400, 400));
        }
        JPanel createTestPanel() {
                JPanel panel = new JPanel();
                JTextArea area = new JTextArea(5,5);
                area.setText("line1\nline2\nline3\nline4\n");
                panel.add(area);
                return panel;
        }
}

If you try this testcase with 1) sun's jvm 2) classpath before fix and 3)
classpath after fix you will see that in case 2) the middle panel with three
horizontally split components is completely invisible although it is visible
in cases 1) and 3). And of course, case 3) also has the added oscillation :-)

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]