• Post Reply Bookmark Topic Watch Topic
  • New Topic

jscroll pane problem.  RSS feed

 
sudheer kiran
Ranch Hand
Posts: 237
Firefox Browser MyEclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have a JTable added in JPane.i am adding columns dynamically.
my requirement is i should get horizontal scroll ball accrodingly when new columns added are not fitting within panel.

in this case am i need to add JScrollPane to table or panel.

thanks.
 
Campbell Ritchie
Sheriff
Posts: 53779
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It may be that you need to add the panel to the scroll pane. Try this Java™ Tutorials section.
 
Rob Camick
Ranch Hand
Posts: 2756
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my requirement is i should get horizontal scroll ball accrodingly when new columns added

When you create the table you need to use:

table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!