List of usage examples for javax.swing JEditorPane setMinimumSize
@BeanProperty(description = "The minimum size of the component.") public void setMinimumSize(Dimension minimumSize)
From source file:Main.java
public void createJEditorPane(Container bg, Dimension size) { JEditorPane pane = new JEditorPane(); pane.setEditable(false);/*from www .j a va2 s.c o m*/ HTMLEditorKit editorKit = new HTMLEditorKit(); pane.setEditorKit(editorKit); pane.setSize(size); pane.setMinimumSize(size); pane.setMaximumSize(size); pane.setOpaque(true); pane.setText( "<b><font face=\"Arial\" size=\"50\" align=\"center\" > Unfortunately when I display this string it is too long and doesn't wrap to new line!</font></b>"); bg.add(pane, BorderLayout.CENTER); }