List of usage examples for javax.swing JEditorPane getScrollableTracksViewportHeight
@BeanProperty(bound = false) public boolean getScrollableTracksViewportHeight()
Scrollable
to match the height of the viewport. From source file:Main.java
public static void main(final String args[]) { JFrame frame = new JFrame("EditorPane Example"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); try {/*from w ww . jav a2s . co m*/ JEditorPane editorPane = new JEditorPane("http://www.java2s.com"); editorPane.setEditable(false); boolean b = editorPane.getScrollableTracksViewportHeight(); JScrollPane scrollPane = new JScrollPane(editorPane); frame.add(scrollPane); } catch (IOException e) { System.err.println("Unable to load: " + e); } frame.setSize(640, 480); frame.setVisible(true); }