JDK-7030332 : Default borders in tables looks incorrect JEditorPane
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7,7u2
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-03-23
  • Updated: 2013-05-23
  • Resolved: 2011-09-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u2Fixed 8 b04Fixed
Related Reports
Relates :  
Description
Try to load in JEditorPane the attached html or take a looko at CR 6973777:
-----------
in earlier builds only borders/separating lines are affected ( JDK 7 b42 - b69, see JDK7_FAIL1.jpg )
-----------

Comments
Verified!
23-05-2013

EVALUATION Now HTML.Attribute.BORDER is translated into CSS.Attribute[]{CSS.Attribute.BORDER_TOP_WIDTH, CSS.Attribute.BORDER_RIGHT_WIDTH, CSS.Attribute.BORDER_BOTTOM_WIDTH, CSS.Attribute.BORDER_LEFT_WIDTH} (see javax.swing.text.html.CSS#htmlAttrToCssAttrMap). After that every CSS attribute converted via javax.swing.text.html.CSS.BorderWidthValue. That's incorrect because 1. BORDER attribute of the TABLE tag can be only an integer (but CSS.Attribute.BORDER_TOP_WIDTH can be "thick", "medium" and "thin") 2. Almost all (actually on IE, Firefox and Google Chrome) accepts <table border> and <table border=""> and that means BORDER=1 (see http://www.w3.org/TR/REC-html32-19970114#table, "Note that some browsers also accept <TABLE BORDER> with the same semantics as BORDER=1") 3. BORDER attribute of the TABLE tag specifies the width of the outer border around the table, but now the same value used for cells borders as well. 4. By default cellSpacing = 2, but we use cellSpacing = 0 We should fix all described problems.
08-08-2011