Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class Main {
    public static void main(String[] argv) throws Exception {
        JTextArea textArea = new JTextArea();
        JScrollPane pane = new JScrollPane(textArea);

        // Get the default scrollbar policy
        int hpolicy = pane.getHorizontalScrollBarPolicy();
        // JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED;

        int vpolicy = pane.getVerticalScrollBarPolicy();
        // JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED;
    }
}