JOptionPane.showMessageDialog truncates JTextArea message

后端 未结 4 1299
猫巷女王i
猫巷女王i 2021-01-15 04:20

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

4条回答
  •  难免孤独
    2021-01-15 04:47

    You've got the right idea. Just adjust the rows of your textarea.

    textArea.setRows(10); // or value that seems acceptable to you...
    

    This seemed to fix the issue for me, using 100 words of lorem ipsum.

提交回复
热议问题