• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable troubles  RSS feed

 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jason,
How about something simple like:
table.getTableHeader().setFont( new Font( "Dialog", Font.BOLD, 24 ) );
Regards,
Manfred.
 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!