nablex
nablex

Reputation: 4767

After modal window, parent no longer resizable

I have a root stage which is resizable.

At some point a button click opens a new stage:

Stage originalStage = ...
Stage stage = new Stage();
stage.initModality(Modality.WINDOW_MODAL);
stage.initOwner(originalStage);

However when I hide() or close() the new modal stage, the originalStage becomes unresizable. At the time of test it is maximized and before/while the modal window is open I see a minimize/maximize/close button.

After the modal window closes I the maximize button disappears and I can also no longer resize it (which I could before).

I'm running the oracle JDK 1.8.0_65 on linux.

Is this a bug or am I doing something wrong?

Upvotes: 1

Views: 61

Answers (1)

RoK
RoK

Reputation: 1097

This thing happens (on Linux only, not Windows, not Mac OS) when modal stage show() is invoked before the parent stage comletely draws itself (i.e. in the constructor). My workaround is quite simple:

Platform.runLater(()-> yourModalStage.show());

Upvotes: 0

Related Questions