草庐IT

JEditorPanes

全部标签

java - 不同的 JEditorPanes 显示 html 内容,使用相同的 css 规则

一个简单的swing应用程序绘制了两个独立的JDialog,其中包含具有不同html内容的不同JEditorPanes。在一个JEditorPane中,我们使用css规则来设置表格的边框可见。但是另一个JEditorPane使用相同的css规则并绘制3px表格边框,但它不应该(我们没有明确设置它)。为什么他们使用相同的css规则以及我们如何解决这个问题?publicstaticvoidmain(Stringargs[]){Stringtext1="somthingONE";Stringtext2="somthingTWO";JDialogjd=newJDialog();JEditorP

java - 不同的 JEditorPanes 显示 html 内容,使用相同的 css 规则

一个简单的swing应用程序绘制了两个独立的JDialog,其中包含具有不同html内容的不同JEditorPanes。在一个JEditorPane中,我们使用css规则来设置表格的边框可见。但是另一个JEditorPane使用相同的css规则并绘制3px表格边框,但它不应该(我们没有明确设置它)。为什么他们使用相同的css规则以及我们如何解决这个问题?publicstaticvoidmain(Stringargs[]){Stringtext1="somthingONE";Stringtext2="somthingTWO";JDialogjd=newJDialog();JEditorP