Hello, I have some problems to be solved with JTable 1) The column names do not appear completely 2) I have a field called Remarks and consists of atmost 255 words. I can only see a few words. 3) One of the tables has alot of fields which means a big table and the big table will not be shown completely ( as the frame will be smaller then the size of the table in width ). will a horizontal scroll bar do ??? An early response will be highly appreciated.
2) Get the TableColumnModel and then the individual TableColumn. Then use the setPreferredWidth, setMinWidth, and setMaxWidth methods to adjust the column width:
3) Adding your table to a JScrollPane should do it.
Joined: Aug 07, 2005
Sorry Sir, I still have the same problem. I still see a few words and no horizontal scroll bar is added ?? what should I do? [ August 13, 2005: Message edited by: Hasnain Javed ]
Joined: Apr 21, 2005
Did you change the width of the columns? By default JScrollPanes only show the scrollbars when their contents is bigger than the display area. Trying making the columns very wide and it should stretch the table enough to invoke the scrollbars.