FileDocCategorySizeDatePackage
SimpleSplitPane.javaAPI DocExample1181Mon Nov 09 12:45:48 GMT 1998None

SimpleSplitPane

public class SimpleSplitPane extends JFrame

Fields Summary
static String
sometext
Constructors Summary
public SimpleSplitPane()


    
    super("Simple SplitPane Frame");
    setSize(450, 200);
    addWindowListener(new BasicWindowMonitor());

    JTextArea jt1 = new JTextArea(sometext);
    JTextArea jt2 = new JTextArea(sometext);

    // Make sure our text boxes do line wrapping and have reasonable
    // minimum sizes.
    jt1.setLineWrap(true);
    jt2.setLineWrap(true);
    jt1.setMinimumSize(new Dimension(150, 150));
    jt2.setMinimumSize(new Dimension(150, 150));
    jt1.setPreferredSize(new Dimension(250, 200));
    JSplitPane sp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jt1, jt2);
    getContentPane().add(sp, BorderLayout.CENTER);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    SimpleSplitPane ssb = new SimpleSplitPane();
    ssb.setVisible(true);