• 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

Why does a JScrollPane acquire a spurious bubble under Nimbus LAF?

 
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my time for confusing Swing problems, apparently.

I've created a simple JFrame than contains a JScrollPane. The horizontal scrollbar policy is ALWAYS. When it runs, it appears on screen as I expect it to:



But, if I widen the JFrame to where the JScrollPane is more than 1040 pixels wide, it picks up a bubble in the horizontal scrollbar, even though there's nothing to scroll (and even though widening a pane is how you lose a bubble, not how you get one):



This only happens under the Nimbus look and feel. Metal, CDE/Motif, Windows, and Windows Classic all behave properly.

My code is below.

Can anyone explain to me why this is happening?

 
Bartender
Posts: 732
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There were numberous problems with the Nimbus scrollbars in most versions of Java7. For example, shrinking the window could cause the thumb to disappear completely.
Are you using Java7 or Java8?
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fred Kleinschmidt wrote:There were numberous problems with the Nimbus scrollbars in most versions of Java7. For example, shrinking the window could cause the thumb to disappear completely.


Still does, in fact.

Are you using Java7 or Java8?


SE8. I suppose I'll just switch to Metal as this looks like a genuine bug to me. And that business about the thumb vanishing is not acceptable either.
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic