java - Cannot Maximize Window with JavaFX -
i made custom minimize button way:
public minimizebutton() { button button = new button("-"); button.getstyleclass().clear(); button.getstyleclass().add("actionbutton"); button.setonaction(new eventhandler<actionevent>() { @override public void handle(actionevent event) { stage stage = (stage) ((button) event.getsource()).getscene().getwindow(); stage.seticonified(true); } }); this.getchildren().add(button); }
and called
primarystage.initstyle(stagestyle.undecorated);
the button working well.
the issue when try maximize window once stage iconified, takes couple of seconds window redraw stage.
any ideas on how make "maximizing process" of window faster?
fixed using
primarystage.initstyle(stagestyle.transparent);
instead of
primarystage.initstyle(stagestyle.undecorated);
Comments
Post a Comment