instructions = new JEditorPane();
instructions.setName( "instructions" );
instructions.setContentType( "text/html" );
instructions.setBackground( INSTRUCTIONS_BACKGROUND );
instructions.setForeground( INSTRUCTIONS_FOREGROUND );
instructions.setFont( INSTRUCTIONS_FONT );
instructions.setAlignmentX( 0.5f );
instructions.setAlignmentY( 0.5f );
instructions.setMargin( new Insets( 4, 4, 4, 4 ) );
instructions.setEnabled( true );
instructions.setEditable( false );
final HTMLDocument htmlDocument = new HTMLDocument();
instructions.setDocument( htmlDocument );
instructions.setText( theInstructions );
instructionsScrollPane = new JScrollPane( instructions, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
SwingUtilities.invokeLater( new Runnable()
{
public void run()
{
instructionsScrollPane.getVerticalScrollBar().setValue( 0 );
}
} );
final JScrollBar v = scroller.getVerticalScrollBar();
v.setValue( v.getMaximum() );