Closing Popup JFrame in Applet
So I've coded everything I need using the SE 6 in notepad++. My program allows the user to choose from a few font options, and then display the string in a JFrame pop up window along with an image. When I click the X on the pop up window, select a different set of characteristics for the string, and hit the Ok button it displays the past image and string, along with the new image and string.
I was just wondering how I could close the JFrame to purge the previous text and image displayed. I tried using .dispose();, as well as .setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); and even though it allows me to compile, when I hit the X an exception is thrown (I'd post the exception, but I'm at school and don't have the code with me currently).
Any help is much appreciated!