Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4970030
Votes 0
Synopsis IllegalArgumentException when printing components with zero-length text
Category java:classes_swing
Reported Against tiger-beta
Release Fixed 1.5(tiger-b32)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs 4352983
Submit Date 17-DEC-2003
Description
The fix to [4352983: Clipping of text when printing] is causing an IllegalArgumentException when printing components with zero-length text. The root cause is that the TextLayout constructor does not support zero-length Strings.

This causes a failure when trying to print a JTable that contains any empty table cells. It also causes the SwingSet2 JTable printing demo to fail. The cells containing ImageIcons have no text and trigger this problem.

Attached is a test case that demonstrates the problem. It simply attempts to print a JLabel containing the empty String.

Fixing this is VERY IMPORTANT for the new JTable printing support. 
Work Around
N/A
Evaluation
we need to add zero-length checks to SwingUtilities2
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang