JTable question again

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

stanleyhuenAsked:
Who is Participating?
 
yasser_helmyConnect With a Mentor Commented:
..
If you don't want the scrollbar use
scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);

hope it helps..
0
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.