-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.2.0
-
None
-
generic
-
generic
G'day,
I'm currently trying to use the very straightforward
JOptionPane.showXXXDialogs - in particular, showMessageDialog.
Here is the code:
---8<-------------------------------------------------------
// *** Note: Doesn't like Uppercase here... button label appears as "---"
Object options[] = {"OK"};
JOptionPane.showOptionDialog(parentFrame,
aboutInfo,
aboutTitle,
JOptionPane.INFORMATION_MESSAGE,
JOptionPane.DEFAULT_OPTION,
aboutIcon,
options,
options[0]
);
---8<-------------------------------------------------------
The dialog shows up fine. However, there are two problems:
1) The "OK" on the button appears as "---". If I change the case
of any of the letters is appears e.g. "Ok" appears as "Ok". This
even happens with some of the demos. I'm beginning to wonder if it's
a font-funny on this machine (unfortunately, I haven't run it anywhere
else).
2) I display some lines on the dialog box (it's my "About..." box) - the
usual stuff. However, I pull these lines from a properties file which
embeds "\n" to break the lines up. Once the lines are processed into
a "String[]" and passed to the dialog the longest line is truncated. It
just so happens that the longest line is the 2nd line to display as the
dialog seems to truncate the lines according to the length of the first.
I tried making the first line longer than the 2nd and indeed, all is well.
I'm currently trying to use the very straightforward
JOptionPane.showXXXDialogs - in particular, showMessageDialog.
Here is the code:
---8<-------------------------------------------------------
// *** Note: Doesn't like Uppercase here... button label appears as "---"
Object options[] = {"OK"};
JOptionPane.showOptionDialog(parentFrame,
aboutInfo,
aboutTitle,
JOptionPane.INFORMATION_MESSAGE,
JOptionPane.DEFAULT_OPTION,
aboutIcon,
options,
options[0]
);
---8<-------------------------------------------------------
The dialog shows up fine. However, there are two problems:
1) The "OK" on the button appears as "---". If I change the case
of any of the letters is appears e.g. "Ok" appears as "Ok". This
even happens with some of the demos. I'm beginning to wonder if it's
a font-funny on this machine (unfortunately, I haven't run it anywhere
else).
2) I display some lines on the dialog box (it's my "About..." box) - the
usual stuff. However, I pull these lines from a properties file which
embeds "\n" to break the lines up. Once the lines are processed into
a "String[]" and passed to the dialog the longest line is truncated. It
just so happens that the longest line is the 2nd line to display as the
dialog seems to truncate the lines according to the length of the first.
I tried making the first line longer than the 2nd and indeed, all is well.
- duplicates
-
JDK-4135218 NT: Dialogs created 2 pixels too small first time packed/shown on 1.1.6
- Closed