• Post Reply Bookmark Topic Watch Topic
  • New Topic

eliminate the horizontal scrollbar

 
Peter Primrose
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a panel with a gridlayout. I added to it a scroll bar.

the problem is that when viewing the panel on 800x600 resolution the panel has a horizontal scrollbar. This is not good because the end-user has to play with it to see the entire information.

I need the panel to shriking (there's enought space).

does anyone know how to eliminate the horizontal scrollbar?

thanks
 
Dror Guzman
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you mean JScrollPane! not bar.

From the API:
setHorizontalScrollBarPolicy(int policy)
Determines when the horizontal scrollbar appears in the scrollpane.

So do this:
setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!