Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JButton;
import javax.swing.JSplitPane;

public class Main {
    public static void main(String[] argv) throws Exception {
        JButton topComponent = new JButton("top");
        JButton bottomComponent = new JButton("bottom");

        JSplitPane vpane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, topComponent, bottomComponent);

        boolean b = vpane.isContinuousLayout(); // false by default

        // Set the split pane to continuously resize the child components which the divider is dragged
        vpane.setContinuousLayout(true);
    }
}