I have this snippet of the code:
public class Main_class {
public static void main(String[] args) {
JFrame first = new JFrame();
first.setTitle("Hello");
first.setSize(300, 100);
first.setLocation(300, 100);
first.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
first.setVisible(true);
}
}
I receive primitive frame, my question is how do I supposed to close the window without windows manager task, thanks in advance
If you want to close it anyways I would implement a close listener that disposes the frame: