This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Change JTable header column color  RSS feed

 
mohanrajh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i need to change the color of the header of JTable, that is topmost Title colomn of the JTable.
could some one help me
mohan
 
Tim Tully
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sure... it's pretty easy:
JTableHeader header = table.getTableHeader();
header.setBackground(Color.green); //or some other color
Originally posted by mohanrajh:
hi,
i need to change the color of the header of JTable, that is topmost Title colomn of the JTable.
could some one help me
mohan

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!