954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

jtable

hi
i want to display column in jtable but the columns enter each other and reduce the size of the columns so how i can when i display larger number of columns apper with each column has itis own space

lena1990
Junior Poster in Training
83 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

Set the column width to be wide enough, then place the whole table in a JScrollPane so it scrolls horizontally. See this:
http://stackoverflow.com/questions/2452694/jtable-horizontal-scrollbar-in-java

JamesCherrill
Posting Genius
Moderator
6,373 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073
 

You have to set for JTable#setAutoResizeMode , more is described in JTable's tutorial Setting and Changing Column Widths

mKorbel
Veteran Poster
1,141 posts since Feb 2011
Reputation Points: 480
Solved Threads: 224
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You