jeditorpane

Inconsistent performance applying ForegroundActions in a JEditorPane when reading HTML

醉酒当歌 提交于 2019-11-26 05:30:33
I'm building an HTML editor using JEditorPane , but I'm getting some inconsistent performance issues with Foreground Actions. I have a simplified version of my editor below that has three actions: change the font color to red or blue, or change the font-size. Now using the following testFile.html file: <html> <head><title>Title</title></head> <body link="#0000FF" bgcolor="white"> <font size="4" face="arial" color="black">Some test text</font> <font size="3" face="arial" color="black">Some new test text </font> </body> </html> sometimes I can highlight some text in the editor, and press the red

Inconsistent performance applying ForegroundActions in a JEditorPane when reading HTML

痞子三分冷 提交于 2019-11-26 01:54:49
问题 I\'m building an HTML editor using JEditorPane, but I\'m getting some inconsistent performance issues with Foreground Actions. I have a simplified version of my editor below that has three actions: change the font color to red or blue, or change the font-size. Now using the following testFile.html file: <html> <head><title>Title</title></head> <body link=\"#0000FF\" bgcolor=\"white\"> <font size=\"4\" face=\"arial\" color=\"black\">Some test text</font> <font size=\"3\" face=\"arial\" color=\