This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I was thining... can I use JLabel in cells and use bold on the fin and alignment on the JLabel?
Does anyone know how to do this?
Joined: Sep 20, 2005
Originally posted by Mathias Nilsson: can I use JLabel in cells and use bold on the fin and alignment on the JLabel?
If you take a look at the DefaultTableCellRenderer class, you'll see that it is a JLabel. So if you set one as a renderer, you can set its font and alignment just like you would any other JLabel. You don't use cell renderers like you use labels, though.
Joined: Aug 21, 2004
How do I use the JLabel to paint bold , Italic? I can only do JLabel.getText()..... Otherwise it just prints javax.swing.Jlabel .... and a lot of data in the cell.