JSplitPane setResizeWeight - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for JSplitPane setResizeWeight method.

This code example shows how to use the following methods:setBorder, setLeftComponent, setResizeWeight, setRightComponent
This code example shows how to use the following methods:setBorder, setOneTouchExpandable, setResizeWeight
        tableHeaders.getTableHeader().setDefaultRenderer(
                new HeaderAsPropertyRenderer()); 
        RendererUtils.applyRenderers(tableHeaders, RENDERERS_HEADERS);
 
        // Create the split pane 
        JSplitPane topSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                GuiUtils.makeScrollPane(tableParams),
                GuiUtils.makeScrollPane(tableHeaders));
        topSplit.setOneTouchExpandable(true);
        topSplit.setResizeWeight(0.50); // set split ratio
        topSplit.setBorder(null); // see bug jdk 4131528
 
        JSplitPane paneParsed = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                GuiUtils.makeScrollPane(tableRequest), topSplit);
        paneParsed.setOneTouchExpandable(true);
        paneParsed.setResizeWeight(0.25); // set split ratio (only 5 lines to display)
        paneParsed.setBorder(null); // see bug jdk 4131528
 
        // Hint to background color on bottom tabs (grey, not blue) 
        JPanel panel = new JPanel(new BorderLayout());
6
CodeRank
This code example shows how to use the following methods:setBorder, setOneTouchExpandable, setResizeWeight
        topSplit.setOneTouchExpandable(true);
        topSplit.setResizeWeight(0.80); // set split ratio
        topSplit.setBorder(null); // see bug jdk 4131528
 
        paneParsed = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
                GuiUtils.makeScrollPane(tableResult), topSplit);
        paneParsed.setOneTouchExpandable(true);
        paneParsed.setResizeWeight(0.40); // set split ratio
        paneParsed.setBorder(null); // see bug jdk 4131528
 
        // setup bottom tabs, first Raw, second Parsed 
        tabbedResult.addTab(JMeterUtils.getResString("view_results_table_result_tab_raw"), paneRaw); //$NON-NLS-1$
        tabbedResult.addTab(JMeterUtils.getResString("view_results_table_result_tab_parsed"), paneParsed); //$NON-NLS-1$
 
        // Hint to background color on bottom tabs (grey, not blue) 
        JPanel panel = new JPanel(new BorderLayout());
        panel.add(tabbedResult);
        return panel;
    } 
 
6
CodeRank
This code example shows how to use the following methods:setContinuousLayout, setLeftComponent, setResizeWeight, setRightComponent
This code example shows how to use the following methods:setContinuousLayout, setOneTouchExpandable, setResizeWeight
    public void init() { 
        setLayout(new BorderLayout());
        clustersPanel.init();
        final Host noHost = hostFactory.createInstance();
        final JSplitPane splitPane =
                                new JSplitPane(JSplitPane.VERTICAL_SPLIT, clustersPanel, noHost.getTerminalPanel());
        guiData.setTerminalSplitPane(splitPane);
 
        splitPane.setContinuousLayout(true);
        splitPane.setResizeWeight(1.0);
        splitPane.setOneTouchExpandable(true);
 
        add(splitPane, BorderLayout.CENTER);
        guiData.initTerminalSplitPane();
    } 
} 
6
CodeRank
This code example shows how to use the following methods:setLeftComponent, setOrientation, setResizeWeight, setRightComponent
    public SystemUnderTest(){ 
        setBorder(BorderFactory.createTitledBorder("System Under Test"));
        tbs = new TestBeds();
        sut = new SutEditor();
        setLayout(new BorderLayout());
        final JSplitPane sp = new JSplitPane();
        sp.setLeftComponent(sut);
        sp.setRightComponent(tbs);
        sp.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
        sp.setResizeWeight(0.5);
        SwingUtilities.invokeLater(new Runnable() {
                public void run() { 
                    sp.setDividerLocation(0.5);
                } 
            }); 
        add(sp,BorderLayout.CENTER);
    } 
} 
6
CodeRank
This code example shows how to use the following methods:repaint, setOneTouchExpandable, setResizeWeight
This code example shows how to use the following methods:setBottomComponent, setResizeWeight, setTopComponent
		super(); 
		this.setTitle(friendsListViewMessages.getString("friends"));
		this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
		this.setSize(400, 800);
		this.setLayout(new BorderLayout());
		JSplitPane splitter = new JSplitPane();
		splitter.setResizeWeight(0.5);
 
		JPanel topPanel = new JPanel(new BorderLayout());
		topPanel.add(new LocalizedJLabel(friendsListViewMessages, "online"), BorderLayout.NORTH);
		this.onlineList = new JList<RosterEntry>();
		this.onlineList.setCellRenderer(new FriendListItemRenderer());
		topPanel.add(new JScrollPane(this.onlineList), BorderLayout.CENTER);
 
		JPanel bottomPanel = new JPanel(new BorderLayout());
		bottomPanel.add(new LocalizedJLabel(friendsListViewMessages, "offline"), BorderLayout.NORTH);
		this.offlineList = new JList<RosterEntry>();
		this.offlineList.setCellRenderer(new FriendListItemRenderer());
		bottomPanel.add(new JScrollPane(this.offlineList), BorderLayout.CENTER);
 

6
CodeRank
This code example shows how to use the following methods:setBottomComponent, setOneTouchExpandable, setResizeWeight, setTopComponent
		 
		return tp;
	} 
	 
	private static JSplitPane buildQueryPane() {
		JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true);
		sp.setResizeWeight(0.5);
		sp.setOneTouchExpandable(true);
		 
		sp.setTopComponent(buildQueryStatementPane());
		 
		sp.setBottomComponent(buildSQLResultSetPane());
		 
		return sp;
	} 
	 
	private static JTabbedPane buildDocumentPane() {
		JTabbedPane tp = new ClosableTabbedPane(JTabbedPane.TOP);
		 
		UIRegistry.registerDocumentTab(tp);
6
CodeRank
This code example shows how to use the following methods:setLeftComponent, setResizeWeight, setRightComponent
6
CodeRank
setResizeWeight Method Overview
Specifies how to distribute extra space when the size of the split pane changes.
See Code Examples for other Java 8 JSplitPane Methods: