Swing Components can contain html just fine, like so:
The above causes the labels to be underlined in the below screenshot:
I also use HTML to display the red "(-5 seconds)" in the "New Letters" JButton in the upper right corner.
This works fine when the program is run as an application, and it works fine when it is used in an applet- the first time around. However, when running from a cached version of the applet (after navigating away form the page, or simply refreshing it), the HTML no longer shows up!
Clearing the browser's and Java's cache fixes the problem temporarily, but the problem persists after the page is refreshed or navigated away from.
I found a bug report with similar symptoms here: Bug ID: 7032814 Swing HTML components after navigating back to applet page
There is an SSCCE in the bug report, but since it requires uploading the applet and viewing it in a browser, it might be easier to view my applet, look at the HTML JButton and JLabels, then refresh the page to see the problem:
http://code.kevinworkman.com/TimeFor...rdsApplet.html (applet)
Compare that to the executable Jar:
http://code.kevinworkman.com/TimeFor...meForWords.jar (jar)
Has anybody seen this bug before? Or, more to the point, does anybody know of a workaround for the bug?