I would like to have a button in my window so that if I press a button (button), the window will be closed.
I found out that I can close the window as follows:
referenceToTheFrame.hide();
refToTheFrame.dispose();
But if I do this, the compiler complains:
Note: myProgram.java uses or overrides a deprecated API
Note: Recompile with -Xlint:deprication for details.
Am I doing something unsafe?
Roman source
share