- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    1.4.0, 6
- 
        b22
- 
        generic, x86
- 
        solaris_2.5, windows_xp
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8350876 | 17.0.16-oracle | Alexey Ivanov | P4 | Resolved | Fixed | b01 | 
| JDK-8351513 | 17.0.16 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 | 
| JDK-8350878 | 11.0.28-oracle | Alexey Ivanov | P4 | Resolved | Fixed | b01 | 
| JDK-8350967 | 8u461 | Alexey Ivanov | P4 | Resolved | Fixed | b01 | 
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.
- backported by
- 
                    JDK-8350876 Swing JOptionPane shows </html> tag as a string after newline -           
- Resolved
 
-         
- 
                    JDK-8350878 Swing JOptionPane shows </html> tag as a string after newline -           
- Resolved
 
-         
- 
                    JDK-8350967 Swing JOptionPane shows </html> tag as a string after newline -           
- Resolved
 
-         
- 
                    JDK-8351513 Swing JOptionPane shows </html> tag as a string after newline -           
- Resolved
 
-         
- causes
- 
                    JDK-8350894 [11u] TestJOptionHTMLTag.java fails to compile -           
- Resolved
 
-         
- duplicates
- 
                    JDK-8042134 JOptionPane bungles HTML messages -           
- Resolved
 
-         
- 
                    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
 
-         
- links to
- 
                     Commit
        openjdk/jdk/91072ee3 Commit
        openjdk/jdk/91072ee3
- 
                     Commit(master)
        openjdk/jdk17u-dev/db834e07 Commit(master)
        openjdk/jdk17u-dev/db834e07
- 
                     Review
        openjdk/jdk/10081 Review
        openjdk/jdk/10081
- 
                     Review(master)
        openjdk/jdk8u-dev/659 Review(master)
        openjdk/jdk8u-dev/659
- 
                     Review(master)
        openjdk/jdk11u-dev/3036 Review(master)
        openjdk/jdk11u-dev/3036
- 
                     Review(master)
        openjdk/jdk17u-dev/3318 Review(master)
        openjdk/jdk17u-dev/3318