java - JavaFX: MenuBar showing "..." -
so: have here piece of code using add menu application.
stage window; private void buildwindow() { window = new stage(); window.settitle("face"); //menu menubar mblaunch = new menubar(); menu filelaunch = new menu("file"); menuitem savelaunch = new menuitem("save"); menuitem exitlaunch = new menuitem("exit"); filelaunch.getitems().addall(savelaunch, new separatormenuitem(), exitlaunch); mblaunch.getmenus().add(filelaunch); //housekeeping borderpane bplaunch = new borderpane(); bplaunch.getchildren().addall(mblaunch); scene launch = new scene(bplaunch); window.setscene(launch); window.setminheight(500); window.setminwidth(500); window.show(); }
however: when run code produces:
so, question being, how can make display else ...? in advance.
borderpane places each child @ specific location: center, top, bottom, left, right. if add nodes list of children, doesn’t know place them.
replace this:
bplaunch.getchildren().addall(mblaunch);
with this:
bplaunch.settop(mblaunch);
Comments
Post a Comment