package three.day.frame;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JSplitPane;
public class JSplitPaneDemo01 {
public static void main(String[] args) {
JFrame frame = new JFrame("分割式面板");
frame.setBounds(0, 0, 200, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JSplitPane splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,new JButton("1"),new JButton("2"));
splitpane.setOneTouchExpandable(true);
splitpane.setDividerSize(8);
frame.add(splitpane);
frame.setVisible(true);
splitpane.setDividerLocation(0.5);
}
}