JDialog doesn't size correctly with wrapped JTextArea
问题 While making a program, I noticed a bug with the JOptionPane.showMessageDialog() call. I use a button to create a JTextArea that wraps and then display a dialog containing this text area. If the text area is too large, however, the dialog does not size itself correctly to the height of the JTextArea. The Dialog cuts off the OK button in this example. I replicated the bug in the following code: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class DialogBug { public