aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTable" Watch "JTable" New topic
Author

JTable

ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 124
how can I change column width and column marzin in JTable.

I have inserted icons in JTable.

can i give individual column size
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4540
    
    5

Originally posted by ramesh kancherla:
how can I change column width and column marzin in JTable.

I have inserted icons in JTable.

can i give individual column size


luck, db
There are no new questions, but there may be new answers.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4540
    
    5

Originally posted by Darryl Burke:
[QB][/QB]


Sorry, first post here, clicked the "Add Reply" prematurely.

You can obtain a TableColumn object reference by calling JTable#getColumn (or JTable#getColumnModel#getColumn) and setPreferredWidth of the TableColumn.

There is no direct concept of "margin" for a TableColumn but you can achieve the desired result by a call to JTable#setIntercellSpacing.

Please consult the API for these methods, and if anything's not clear feel free to ask.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTable