• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

JTable question again

Hi,
How can I make the JTable in a JScrollPane uses up all the spaces in the JScrollPane?

0
stanleyhuen
Asked:
stanleyhuen
  • 2
1 Solution
 
s_lavieCommented:
What do you mean by using up all the spaces in the JScrollPane?
0
 
yasser_helmyCommented:
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
 
yasser_helmyCommented:
..
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now