My Java GUI application needs to quickly show some text to the end-user, so the JOptionPane utility methods seem like a good fit. Moreover, the text must be se
JOptionPane
Try this:
JTextArea textArea = new JTextArea(); textArea.setText(getText()); textArea.setSize(limit, Short.MAX_VALUE); // limit = width in pixels, e.g. 500 textArea.setWrapStyleWord(true); textArea.setLineWrap(true);