Domanda

Right now I'm looking for solution how to restrict/consume mouseClicked event if mouse is clicked outside JWindow. For example - JWindow has two buttons "Yes" and "No" (like dialog). And it's parent also has various buttons - but they must be inactive during JWindow (dialog) is visible. Should I restrict parents buttons actions each manually - or maybe there is some better solution?

È stato utile?

Soluzione

..some better solution?

A modal dialog. When a modal dialog is visible, access tot the parent component is blocked.

See How to Use Modality in Dialogs for more details.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top