JScrollPane: getVerticalScrollBarPolicy() : JScrollPane « javax.swing « Java by API






JScrollPane: getVerticalScrollBarPolicy()

  

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;
  }
}   

   
    
  








Related examples in the same category

1.JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS
2.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS
3.new JScrollPane(Component view, int vsbPolicy, int hsbPolicy)
4.JScrollPane: getHorizontalScrollBar()
5.JScrollPane: getHorizontalScrollBarPolicy()
6.JScrollPane: getVerticalScrollBar()
7.JScrollPane: setColumnHeaderView(Component view)
8.JScrollPane: setCorner(String key, Component corner)
9.JScrollPane: setRowHeaderView(Component com)
10.JScrollPane: setViewportView(Component view)