¡@

Home 

java Programming Glossary: visiblerect

JScrollPane resize containing JPanel when scrollbars appear

http://stackoverflow.com/questions/10331129/jscrollpane-resize-containing-jpanel-when-scrollbars-appear

@Override public int getScrollableBlockIncrement Rectangle visibleRect int orientation int direction return orientation SwingConstants.HORIZONTAL.. return orientation SwingConstants.HORIZONTAL Math.max visibleRect.width 9 10 1 Math.max visibleRect.height 9 10 1 @Override public.. Math.max visibleRect.width 9 10 1 Math.max visibleRect.height 9 10 1 @Override public boolean getScrollableTracksViewportHeight..

MigLayout JTextArea is not shrinking when used with linewrap=true

http://stackoverflow.com/questions/2475787/miglayout-jtextarea-is-not-shrinking-when-used-with-linewrap-true

public int getScrollableBlockIncrement Rectangle visibleRect int orientation int direction return 0 public boolean getScrollableTracksViewportHeight.. true public int getScrollableUnitIncrement Rectangle visibleRect int orientation int direction return 0 Then wherever you would..

JScrollpane needs to shrink its width

http://stackoverflow.com/questions/2716274/jscrollpane-needs-to-shrink-its-width

public int getScrollableUnitIncrement Rectangle visibleRect int orientation int direction return 10 public int getScrollableBlockIncrement.. return 10 public int getScrollableBlockIncrement Rectangle visibleRect int orientation int direction return orientation SwingConstants.VERTICAL.. int direction return orientation SwingConstants.VERTICAL visibleRect.height visibleRect.width 10 public boolean getScrollableTracksViewportWidth..

How to make JTextPane autoscroll only when scroll bar is at bottom and scroll lock is off?

http://stackoverflow.com/questions/4045722/how-to-make-jtextpane-autoscroll-only-when-scroll-bar-is-at-bottom-and-scroll-lo

static void scrollToBottom JComponent component Rectangle visibleRect component.getVisibleRect visibleRect.y component.getHeight visibleRect.height.. component Rectangle visibleRect component.getVisibleRect visibleRect.y component.getHeight visibleRect.height component.scrollRectToVisible.. component.getVisibleRect visibleRect.y component.getHeight visibleRect.height component.scrollRectToVisible visibleRect public static..