This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable is not fit to the screen width.

 
Rajakumar Kasi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JTable is not displayed to the full width of the screen.
I am using AUTO_RESIZE_OFF option in setAutoResizeMode(JTable.AUTO_RESIZE_OFF); API.
It makes the JTable to shrink fit to the screen and not fit to the entire width of the screen.

Any thoughts please to make the JTable to fit completely to the width of the screen?

Thanks in advance,
Rajakumar K
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you laying out the window? The overall size of a JTable is going to be controlled by the layout managers that you are using. The AUTO_RESIZE affects the width of the columns, not the overall size.
 
Rajakumar Kasi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matthew,
Thanks a lot for your quick response.
I did not set any layout manager explicitly to my JTable.
May I know the layout manager which fit the JTable to the complete width of the screen.
 
Kevin Workman
Ranch Hand
Posts: 151
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BeForthrightWhenCrossPostingToOtherSites
http://forums.oracle.com/forums/thread.jspa?threadID=1556851

Same answer there, too.

edit And the same answer in
http://www.java-forums.org/awt-swing/33415-jtable-not-fit-screen-width.html

edit2 Drat, beaten by a second. Do I get a silver medal?
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Kevin, you missed one
http://www.javaprogrammingforums.com/awt-java-swing/5528-jtable-not-fit-screen-width.html
 
Matthew Brown
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajakumar Kasi wrote:May I know the layout manager which fit the JTable to the complete width of the screen.


I'd probably use a BorderLayout, but it depends on what the rest of the screen layout is. I'd suggest going through the Layout Manager tutorial to get an idea of what they can all do.

 
Kevin Workman
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I didn't even know about those forums! Looks like I'm going to have to add that to my growing list of forums to keep track of!
 
Rajakumar Kasi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I relatively new to this forum practice and hardly I posted 2 or 3 threads so far. I feel sorry for my unfair crossposting practice. I continue only at http://www.java-forums.org/awt-swing/33415-jtable-not-fit-screen-width.html#post148843
 
Darryl Burke
Bartender
Posts: 5148
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kevin Workman wrote:


I didn't even know about those forums! Looks like I'm going to have to add that to my growing list of forums to keep track of!

Just use Google to find the cross posts and sign up everywhere with the same username and password. I've lost track of how many forums I've joined that way

Bartenders, please feel free to delete this OT conversation.
 
Rajakumar Kasi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to delete this thread?
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't. If you don't want it anymore, just let it die slowly. Without replies it will drop to the bottom of the first forum page, then move to the second, etc, until the search is the only way to find it.
 
Rajakumar Kasi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prime,
Thanks a lot.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic