-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
5.0
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2119960 | 5.0u3 | Shannon Hickey | P4 | Closed | Won't Fix |
Name: gm110360 Date: 07/20/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
When using the JTable.print() method with the Windows XP look & feel, the table header printout looks blurry / pixelated. The effect is pronounced when there are many columns that must be sized to fit on the printout page.
I attempted to print the same table with 10 columns using the Windows Classic look & feel and the problem is not there. I only see it with the Windows XP look & feel.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a JFrame
Create a Box (Y-axis orientation)
Create a table with 10 columns (each column header is "Column [x]") and any body.
Add the table header and table to the Box
Add the Box to the JFrame
Show the JFrame
Call print() on the table.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The printout should have the entire table on one page and each column header and cell entry should be readable.
ACTUAL -
The table body is readable.
The table header is pixelated / blurry.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.*;
/*
* Entry point for the program
*/
public class Main
{
/**
* Entry point into the program.
* @param args Command line arguments
*/
public static void main(String[] args)
{
// Rows and Columns lengths
final int ROWS = 6;
final int COLS = 10;
// Instantiate the rows and columns
final Object[][] m_rows = new Object[ROWS][COLS];
final String[] m_cols = new String[COLS];
// Populate the rows and columns
for ( int i = 0; i < COLS; i++ )
{
m_cols[i] = "Col " + i;
for ( int j = 0; j < ROWS; j++ )
{
m_rows[j][i] = "Row " + i + ", Col " + j;
}
}
try
{
// Use the Windows Look & Feel
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
// Create the table in a frame
JFrame frame = new JFrame("Title");
JTable table = new JTable(m_rows, m_cols);
Box contentBox = new Box(BoxLayout.Y_AXIS);
contentBox.add(table.getTableHeader());
contentBox.add(table);
frame.add(contentBox);
frame.pack();
// Display the frame and print the table
frame.setVisible( true );
table.print();
}
catch (Exception e)
{
e.printStackTrace();
}
System.exit(0);
} /* end main */
} /* end Main */
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use the Windows Classic look & feel.
(Incident Review ID: 286555)
======================================================================
- backported by
-
JDK-2119960 JTable headers do not print well under WIndows XP Look & Feel
-
- Closed
-