Hide « JSplitPane « Java Swing Q&A





1. hide one part of JSplitPane in Applet    stackoverflow.com

Here is my situation, i want to implement a sidebar on the right side of a JFrame. The sidebar is hidden in default, appear if i click a button. In order ...

2. JSplitPane: is there a way to show/hide one of the panes?    stackoverflow.com

I have a JSplitPane with two components, A and B, but sometimes I want to be able to hide B, so that either of the following are true:

  • components A and B ...

3. hide splitpane divider    coderanch.com

I have a splitpane with two panels. I want the bottom panel to be shown only when the user does some action. So, initially the splitpae divider should be at the hidden. Can we hide the splitpane divider so that the user can not drag the splitpane's top bottom to make the bottom panel visible. Thanks

4. Why my JSplitPane can't hide or show as I want?    coderanch.com

import javax.swing.*; import java.awt.event.*; import java.awt.event.ActionEvent; import java.awt.BorderLayout; import java.awt.Dimension; public class SplitPaneTest implements ActionListener{ boolean show = false; JButton buttonB = new JButton("Show or Hide"); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); public SplitPaneTest() { JFrame frame = new JFrame("SplitPane show and hide test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setDefaultLookAndFeelDecorated(true); frame.setSize(500, 400); JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); JButton button = new JButton("OK"); button.addActionListener(this); splitPane.add(button, JSplitPane.TOP); splitPane.add(buttonB, ...