Good day. Faced the following problem:

There is a MMenu panel, on which is the Exit button. Clicking on Exit should display the CheckExit panel (which is also located on the MMenu panel) ( CheckExit is a check of exit from the program, in the form of 2 "Back" and "Exit" buttons).

CheckExit small in size and does not completely cover all elements of the MMenu panel, which allows you to click on the MMenu panel MMenu that remain visible.

The question is how to disable all elements on the MMenu panel (Except the CheckExit panel, of course) so that the user can only work with CheckExit elements during the check and at the same time, the elements of the MMenu panel must remain visible?

  • Better attach some of your code. - Aleksei Chibisov

1 answer 1

Alternatively, for all menu items, call the setEnabled(false); method setEnabled(false); at the time of clicking on Exit. And back setEnabled(true); if "Back" is pressed

  • This, of course, is an option, but it lengthens the code. I would like to know a more concise version of this action. - TrueASL