I have come across this code snippet for a Java swing JLabel:
"<html>\n" +
"<head><style>\n" +
"p { color: white;\n" +
" text-shadow:\n" +
" -1px -1px 0 #000,\n" +
" 1px -1px 0 #000,\n" +
" -1px 1px 0 #000,\n" +
" 1px 1px 0 #000; }" +
"</style></head>\n" +
"<body><p>testing123</p></body>\n" +
"</html>"
This is a customized example I discovered on how to add an outline around text using HTML. Although the text "testing123" appears in white (or any specified color), the shadow or outline doesn't show up irrespective of the background color. This method works on the w3schools css tester page, but it seems that it's not compatible with all browsers, including swing. Is there a way to implement this successfully?