Java Standard: Grafische Oberflächen mit Swing: leightweight Container: javax swing JSplitPane
Erscheinungsbild
import javax.swing.JFrame;
import javax.swing.JSplitPane;
import javax.swing.JPanel;
public class fenster extends JFrame {
public fenster() {
this.setSize(400, 300);
this.setTitle("SplitPane beispiel");
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel linkepanel = new JPanel();
JPanel rechtepanel = new JPanel();
JSplitPane teiler = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true,
linkepanel, rechtepanel);
teiler.setOneTouchExpandable(true);
this.getContentPane().add(teiler);
}
public static void main(String[] args) {
fenster p = new fenster();
p.setVisible(true);
}
}