-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
6
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If you have a multicolumn JTable and with intercell spacing on it highlighting is not drawn within the intercell spacing. The highlighting doesn't extend to the edge of the cell and rather than a continuous highlighted line you instead get a patchwork effect.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a table,
setIntercellSpacing on it,
select a row
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The highlighting should entirely fill all the cell area and extend unbroken from left to right
ACTUAL -
The highlighting only fills the components clipping region. The highlighting doesn't fill the entire cell.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JTable;
public class TableDemo {
public static void main(String args[]) {
JTable table = new JTable(4, 8);
table.setIntercellSpacing(new Dimension(9,4));
JFrame frame = new JFrame("Select a row, see how bad it looks"); //$NON-NLS-1$
frame.setContentPane(table);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Don't use intercell spacing
java version "1.6.0_03"
Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
If you have a multicolumn JTable and with intercell spacing on it highlighting is not drawn within the intercell spacing. The highlighting doesn't extend to the edge of the cell and rather than a continuous highlighted line you instead get a patchwork effect.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a table,
setIntercellSpacing on it,
select a row
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The highlighting should entirely fill all the cell area and extend unbroken from left to right
ACTUAL -
The highlighting only fills the components clipping region. The highlighting doesn't fill the entire cell.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.JTable;
public class TableDemo {
public static void main(String args[]) {
JTable table = new JTable(4, 8);
table.setIntercellSpacing(new Dimension(9,4));
JFrame frame = new JFrame("Select a row, see how bad it looks"); //$NON-NLS-1$
frame.setContentPane(table);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Don't use intercell spacing