aspose file tools
The moose likes Swing / AWT / SWT / JFace and the fly likes JTable troubles Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "JTable troubles" Watch "JTable troubles" New topic
Author

JTable troubles

Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
I need to increase the font size for the column headers of a JTable. I assume they are called headers--those little gray boxes labeled "A" "B" "C" at the top of the columns in Excel. Anyway, I can adjust the width of these but I need to increase the height and/or the font size of the text inside them. Any ideas?
Thanks,
-Jason


Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Jason,
How about something simple like:
table.getTableHeader().setFont( new Font( "Dialog", Font.BOLD, 24 ) );
Regards,
Manfred.
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
Well, now I feel like a complete idiot for not remembering that JTableHeader is also a subclass of (J)Component. Thanks for the help. Sorry for wasting your time.

-Jason
 
jQuery in Action, 2nd edition
 
subject: JTable troubles
 
Threads others viewed
JTable
JTable doubt
JTable Header
Remembering JTable column widths
Height of JTable
IntelliJ Java IDE