aspose file tools
The moose likes Beginning Java and the fly likes JTable Column Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JTable Column Size" Watch "JTable Column Size" New topic

JTable Column Size

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I am creating an application, that displays a JTable and
a JTextField among other things. A user can select a column
and then type in a size for that column.
I know that my code is getting the correct size. However the column never displays itself correctly. EX: A column with a
size of 20 characters does not display 20 characters.
I am using AbstractTableModel, and a TableColumn to handle
everything. The amount of code that I have is to large to
include in a message, but I will anyone the code if they wish.
I am using setAutoResizeMode(JTable.AUTO_RESIZE_OFF) so
that I can handle that column sizes manually.
Any suggestions would be helpful.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: JTable Column Size