public JScrollPane getScrollPane ( JTextComponent editorPane ) { Container p = editorPane . getParent ( ) ; while ( p != null ) { if ( p instanceof JScrollPane ) { return ( JScrollPane ) p ; } p = p . getParent ( ) ; } return null ; }
Get the JscrollPane that contains an editor pane or null if none .