@@ -633,6 +633,8 @@ private static JComponent createInstructionUIPanel(String instructions,
633633 ? configureHTML (instructions , rows , columns )
634634 : configurePlainText (instructions , rows , columns );
635635 text .setEditable (false );
636+ text .setBorder (createTextBorder ());
637+ text .setCaretPosition (0 );
636638
637639 JPanel textPanel = new JPanel (new BorderLayout ());
638640 textPanel .setBorder (createEmptyBorder (GAP , 0 , GAP , 0 ));
@@ -687,7 +689,6 @@ private static JTextComponent configurePlainText(String instructions,
687689 JTextArea text = new JTextArea (instructions , rows , columns );
688690 text .setLineWrap (true );
689691 text .setWrapStyleWord (true );
690- text .setBorder (createTextBorder ());
691692 return text ;
692693 }
693694
@@ -701,10 +702,10 @@ private static JTextComponent configureHTML(String instructions,
701702
702703 HTMLEditorKit kit = (HTMLEditorKit ) text .getEditorKit ();
703704 StyleSheet styles = kit .getStyleSheet ();
704- // Reduce the default margins
705- styles .addRule ("ol, ul { margin-left-ltr: 20 ; margin-left-rtl: 20 }" );
706- // Make the size of code blocks the same as other text
707- styles .addRule ("code { font-size: inherit }" );
705+ // Reduce the list default margins
706+ styles .addRule ("ol, ul { margin-left-ltr: 30 ; margin-left-rtl: 30 }" );
707+ // Make the size of code (and other elements) the same as other text
708+ styles .addRule ("code, kbd, samp, pre { font-size: inherit }" );
708709
709710 return text ;
710711 }
0 commit comments