JSplitPaneTest.java



/** JSplitPane のテスト */
import java.awt.*;
import javax.swing.*;
public class JSplitPaneTest extends JSplitPane {

 /** コンストラクタ */
    public JSplitPaneTest() {
        super( JSplitPane.VERTICAL_SPLIT );
        GridPanel gridPanel = new GridPanel();
        GridBagPanel gridBagPanel = new GridBagPanel();
        setTopComponent( gridPanel );
        setBottomComponent( gridBagPanel );
    }

 /** 最初に呼び出されるメソッド */
    public static void main( String argv[] ) {

        JFrame frame = new JFrame( "JSplitPane Test" );
        JSplitPaneTest pane = new JSplitPaneTest();
        frame.getContentPane().add( pane );
        frame.setSize( 400, 400 );
        frame.setVisible( true );
    }
}