• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scrollbar not appearing in JTable put in JScrollPane?

 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
I have a problem, see if any one can help me out.
I am adding a JTable in a JScrollPane which is added to a JPanel in a JDialog. Now my JTable has over 170 rows but it is not showing the scrollbar, ie there are records below what rows are visible to me, but i cannot scroll down, i have set Autoscrolls(true) for both JTable as well as JScrollPane. Also i have set the Policy for JScrollPane's VerticalScrollBar to ALWAYS, it is showing me the scrollbar but not the slider on the bar?? Please help me out.
Thanks
Daman
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sidhu
are u building u'r table from any model(Defaulttablemodel or abstracttable model) scroll bars automatically show up. If u r not getting the scrollbars then try to set.
setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
property of Jtable as JTable tend to resize itself
Cheers
George Justin
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic