-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0, 6
-
b22
-
generic, x86
-
solaris_2.5, windows_xp
For example, in the code snippet below: I do something like this
String Message = "<html>" + "This is a test\n" + "</html>";
JOptionPane dialog = new JOptionPane();
dialog.setMessage(Message);
dialog.setMessageType(JOptionPane.INFORMATION_MESSAGE);
dialog.setOptions(buttons);
dialog.setOptionType(JOptionPane.DEFAULT_OPTION);
dialog.setInitialValue(buttons[0]);
When the dialog is displayed, it showed:
"This is a test
</html>"
Now, if I don't have a linefeed "\n" (or tab "\t") in my message, this it's okay.
The dialog will display "This is a test"
So, the problem here is that "</html> is display in the GUI dialog box.
Is this a known issue? I tried this with both JDK 1.4 and 1.5 beta3 and the symptom is the same.
###@###.### 2004-07-14
###@###.### 2004-07-14
A long html message will also be broken up into multiple lines if the method JOptionPane.getMaxCharactersPerLineCount() is overridden to return a limiting value. The first line is then formatted correctly, but subsequent lines show raw html tags.
String Message = "<html>" + "This is a test\n" + "</html>";
JOptionPane dialog = new JOptionPane();
dialog.setMessage(Message);
dialog.setMessageType(JOptionPane.INFORMATION_MESSAGE);
dialog.setOptions(buttons);
dialog.setOptionType(JOptionPane.DEFAULT_OPTION);
dialog.setInitialValue(buttons[0]);
When the dialog is displayed, it showed:
"This is a test
</html>"
Now, if I don't have a linefeed "\n" (or tab "\t") in my message, this it's okay.
The dialog will display "This is a test"
So, the problem here is that "</html> is display in the GUI dialog box.
Is this a known issue? I tried this with both JDK 1.4 and 1.5 beta3 and the symptom is the same.
###@###.### 2004-07-14
###@###.### 2004-07-14
A long html message will also be broken up into multiple lines if the method JOptionPane.getMaxCharactersPerLineCount() is overridden to return a limiting value. The first line is then formatted correctly, but subsequent lines show raw html tags.
- duplicates
-
JDK-6515690 Newline makes JOptionPane render closing html tag
- Closed
- relates to
-
JDK-6426317 jconsole reconnect dialog can be wider than screen, and 'ok' button is then offscreen
- Resolved
-
JDK-4274423 JOptionPane.getMaxCharactersPerLineCount needs a setMaxCharactersPerLineCount
- Open
-
JDK-4607516 Japanese strings in JOptionPane are not wrapped.
- Closed
(1 links to)