A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
can we change font or size of a particular column in jtable
Joined: Jun 10, 2009
Nov 11, 2009 02:58:34
i want to change a particular column data fonts and size in swings jtable,, is it possible, because i tried many codes but they are changing whole tables font.... please suggest how to do it..
Joined: Jun 13, 2009
Nov 11, 2009 09:30:28
Why did you use the "Code" tags for your question? Did you not use the "Preview" button to make sure the question made sense? You can alse edit your question to make changes.
Start by reading the section from the Swing tutorial on "How to Use Tables".
The tutorial has a working example on how to change the size of a column.
For the font you will need to create a new instance of the
, and add the renderer to the column. Then you can change the Font for that rendererer only.
I agree. Here's the link:
subject: can we change font or size of a particular column in jtable
How to change font in JTable?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015