cancel
Showing results for 
Search instead for 
Did you mean: 

this.dispose(); doesn't work

Former Member
0 Kudos

Hello everyone,

For some reason "this.dispose();" will compile in my code but won't work. It won't do anything the window stays exactly how it was, it doesn't disappear.

Any suggestions as to why this might be happening? cause it's driving me crazy :o(

(same with this.hide();)

oh and I don't know if it makes a difference but System.exit(1); works but I don't want to exit the whole thing since I call another class which opens another window.

thanks in advance for any help.

Alex

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

ok, I kind of figured it out basically I couldn't use "this.dispose();" so it can work I had to call it on the JFrame specifically like: "dFrame.dispose();" I'm not exactly sure why but since it works I'm happy 🐵