United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7030332 Default borders in tables looks incorrect JEditorPane
JDK-7030332 : Default borders in tables looks incorrect JEditorPane

Details
Type:
Bug
Submit Date:
2011-03-23
Status:
Closed
Updated Date:
2013-05-23
Project Name:
JDK
Resolved Date:
2011-09-07
Component:
client-libs
OS:
generic
Sub-Component:
javax.swing
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7,7u2
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

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
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.
                                     
2011-08-08
Verified!
                                     
2013-05-23



Hardware and Software, Engineered to Work Together