java - How to grow progress bar horizontally in javafx? -


i have application have table , progressbar. want expand progress bar when user resizes window. textbox in javafx can able set hbox priority , achieve intended. progressbar not working.

can 1 tell me doing wrong ?

hbox root = new hbox();            final progressbar browser = new progressbar();  //  final webengine webengine = browser.getengine(); // browser.settext("jjj"); hbox.sethgrow(browser, priority.always);          //  webengine.loadcontent("<b>asdf</b>");               root.getchildren().add(browser); scene.setroot(root); 

bind widths of progress bar , vbox:

vbox root = new vbox(); root.setalignment(pos.top_center); final progressbar browser = new progressbar(); browser.prefwidthproperty().bind(root.widthproperty().subtract(20));  //  -20     // padding right , left, since aligned top_center. root.getchildren().add(browser); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -