I use JEditPane to display HTML text containing links and make links available. I managed to do this, but text and links are shown in ugly font and color, underlined default link, etc. Is there a way to change the default behavior of JEditPane without editing the HTML inside?
Appreciate Thanks
Try adding a CSS style, for example:
JEditorPane jEditorPane = new JEditorPane(); HTMLEditorKit kit = new HTMLEditorKit(); StyleSheet styleSheet = kit.getStyleSheet(); styleSheet.addRule("A {color:red}"); //change links to red jEditorPane.setEditorKit(kit);
Source: https://habr.com/ru/post/1784560/More articles:HTML / JavaScript debugging in Eclipse - javascriptErlang and records - erlangString.Empty or null: which is better to return for the Error field from the service? - stringJoin Unions - sqlstd :: set > :: find (), without building a string copy - c ++Getting a 32-bit COM client for working with a 64-bit server outside the processor using Java / JaCoB - javag ++ and libstdC ++ - c ++IPv6 realm identifier issue with IE and ASP.NET - asp.netHow to use a 32-bit COM object from a 64-bit process? - javaRedirectFromLoginPage() не обновляет User.Identity.Name - asp.netAll Articles