aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes can we change font or size of a particular column in jtable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "can we change font or size of a particular column in jtable" Watch "can we change font or size of a particular column in jtable" New topic
Author

can we change font or size of a particular column in jtable

santosh kimothi
Ranch Hand

Joined: Jun 10, 2009
Posts: 32


Santosh Kimothi,
Java programmer
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2203
    
    7
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 DefaultTableCellRenderer, and add the renderer to the column. Then you can change the Font for that rendererer only.
 
 
subject: can we change font or size of a particular column in jtable