-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.4.0
-
x86
-
windows_2000
Name: rmT116609 Date: 12/03/2001
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
also
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
JOptionPane.showMessageDialog() does not properly size the dialog to fit all
its contents. The OK button is pushed off the bottom of the dialog.
Here is a test cases using a JTextArea for the message component. The JTextArea
is properly sized, but the dialog is not any taller and so the OK button almost
disappears.
import javax.swing.*;
public class OptTest {
public static void main(String args[]) {
JTextArea msg = new JTextArea("one two three four five six"+
"seven eight nine ten one two three four five six seven eight nine ten one two"+
"three four five six seven eight nine ten one two three four five six seven"+
"eight nine ten one two three four five six seven eight nine ten one two three"+
"four five six seven eight nine ten", 0, 40);
msg.setLineWrap(true);
JOptionPane.showMessageDialog(null, msg);
System.exit(0);
}
}
(Review ID: 136681)
======================================================================
- duplicates
-
JDK-4104906 JOptionPane should wordwrap message text
-
- Open
-