I want to implement a code that dipose the JFrame that is open. Searched through multiple questions here in stackoverflow, but I still get an error message for this code
Returns_Show_Data.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
Error: Non-static method setDefaultCloseoperation(int) cannot be referenced from a static context… I also tried:
Returns_Show_Data.dispose();
And it also says the same.
Thanks in advance.