List of usage examples for javax.swing JScrollPane getHorizontalScrollBarPolicy
public int getHorizontalScrollBarPolicy()
From source file:Main.java
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; }
From source file:Main.java
public static boolean isHorizontalScrollBarHiddenAlways(JScrollPane pane) { return (pane != null) && (pane.getHorizontalScrollBarPolicy() == JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); }