java - JScrollBar don't show thumb in Nimbus L&F -


i got problem happens on nimbus l&f. if there many items in jlist, thumb of jscrollbar disappear. in metal l&f, thumb visible, because has min size. have checked logic in nimbus l&f, there have same min size. not effected.

please see code below:

    public static void main(string[] args) {     (uimanager.lookandfeelinfo info : uimanager.getinstalledlookandfeels()) {         if ("nimbus".equals(info.getname())) {             try {                 uimanager.setlookandfeel(info.getclassname());             } catch (classnotfoundexception ex) {                 logger.getlogger(demo.class.getname()).log(level.severe, null, ex);             } catch (instantiationexception ex) {                 logger.getlogger(demo.class.getname()).log(level.severe, null, ex);             } catch (illegalaccessexception ex) {                 logger.getlogger(demo.class.getname()).log(level.severe, null, ex);             } catch (unsupportedlookandfeelexception ex) {                 logger.getlogger(demo.class.getname()).log(level.severe, null, ex);             }             break;         }     }      jframe f = new jframe("metal (height 300)");      string[] ss = new string[100];     (int = 0; < ss.length; i++) {         ss[i] = "" + i;     }      jlist<string> l = new jlist<string>();     l.setlistdata(ss);      final jscrollpane jscrollpane = new jscrollpane(l);     f.getcontentpane().add(jscrollpane);     f.setdefaultcloseoperation(jframe.exit_on_close);     f.setsize(300, 300);     f.setvisible(true); } 

when set "f.setsize(300, 300);", thumb disappear.

enter image description here

but if set "f.setsize(300, 400);", thumb visible.

enter image description here

how can set thumb visible?

enter image description here

try set minimum size of thumb 1

getdefaults().put("scrollbar.minimumthumbsize", new dimension(29, 1)); 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -