Is it possible to disable JFrame close operation?
EDIT.
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
frame.addWindowListener(
new WindowAdapter() {
@Override
public void windowClosing(final WindowEvent e) {
}
});
And this code doesn't solve the problem.
EDIT Is it possible to consume WindowClosing event?