我有一個顯示含有像這樣的圖像鏈接一個JEditorPane:JEditorPane中從圖像鏈接刪除邊框
<a href='http://somesite.com/'>
<img src='someImage.png' />
</a>
當JEditorPane中顯示此爲HTML,它把圖像帶有藍色邊框我正努力刪除沒有任何運氣。
我希望它看起來像這裏面的JEditorPane中的: 圖像:(http://randomcloud.net/img/prob/valid.png)
但這是JEditorPane中如何顯示它: 圖像(http://randomcloud.net/img/prob/jeditorpane.png)
這是我曾嘗試到目前爲止,它仍然不起作用
editorPane = new JEditorPane("http://randomcloud.net/ads/index.php?id=1");
StyleSheet style = ((HTMLDocument)editorPane.getDocument()).getStyleSheet();
style.addRule("a img {text-decoration: none; border: none;}");
任何建議或見解?
-Michel
謝謝!創建我自己的ImageView並使用所描述的方法刪除邊框。 – Alien595