When full screen is applied in javaFx the controllers doesnt adjust to the screen -
im doing 1st javafx project using scene builder 2.0. when set fullscreen method true, anchor pane goes full screen controllers inside container doesn't adjust according adjusted pane size. great if point me out have messed up. code have used in main program.
public void start(stage stage) throws exception { parent root = fxmlloader.load(getclass().getresource("fxmldocument.fxml")); javafx.geometry.rectangle2d r = screen.getprimary().getbounds(); scene scene = new scene(root,r.getwidth(), r.getheight()); string css = this.getclass().getresource("newcascadestylesheet.css").toexternalform(); stage.setscene(scene); scene.getstylesheets().add(css); stage.show(); }
ive set sizes padding , using scene builder options. in advance.
i think missing fit parent setting in view. using scenebuilder, suggest try following: in hierarchy view (left side) right-click component , select fit parent. example (taken this awesome tutorial):
Comments
Post a Comment