Solved

JTable question again

Posted on 2002-07-14
3
194 Views
Last Modified: 2010-03-31
Hi,
How can I make the JTable in a JScrollPane uses up all the spaces in the JScrollPane?

0
Comment
Question by:stanleyhuen
  • 2
3 Comments
 
LVL 2

Expert Comment

by:s_lavie
ID: 7156658
What do you mean by using up all the spaces in the JScrollPane?
0
 
LVL 3

Expert Comment

by:yasser_helmy
ID: 7156938
hi stanleyhuen,
try
JScrollPane scroll=new JScrollPane();
JTable t=new JTable();
scroll.setViewportView(t);

Is this what you are asking for? send me comments, please.
0
 
LVL 3

Accepted Solution

by:
yasser_helmy earned 100 total points
ID: 7156944
..
If you don't want the scrollbar use
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);

hope it helps..
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Application launch issue with Apache Tomcat 5 62
servlet  URL Rewriting 1 42
Java exception bubble up 2 21
jboss 7.1 start up error 1 28
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question