Originally Posted by Fubarable
|
1) I would strongly urge you not to use a JFrame here but rather a JDialog. It can do most anything a JFrame can do, and behaves better with JApplets.
2) It's kind of hard to know what further advice to give you without being able to see the complete error message. If you are still having trouble when you get home, why not post this message?
Best of luck.
|
Alas I'm home and I lied. It's when I hit the ok button that no frame pops up, and the exception is displayed (when the dispose(), and other function are included):
Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
at java.security.AccessControlContext.checkPermission (AccessControlContext.java:323)
at java.security.AccessController.checkPermission(Acc essController.java:546)
at java.lang.SecurityManager.checkPermission(Security Manager.java:532)
at java.lang.SecurityManager.checkExit(SecurityManage r.java:744)
at javax.swing.JFrame.setDefaultCloseOperation(JFrame .java:377)
at FlagApplet$7.actionPerformed(FlagApplet.java:66)
at javax.swing.AbstractButton.fireActionPerformed(Abs tractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed (AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultB uttonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.jav a:6216)
at javax.swing.JComponent.processMouseEvent(JComponen t.java:3265)
at java.awt.Component.processEvent(Component.java:598 1)
at java.awt.Container.processEvent(Container.java:204 1)
at java.awt.Component.dispatchEventImpl(Component.jav a:4583)
at java.awt.Container.dispatchEventImpl(Container.jav a:2099)
at java.awt.Component.dispatchEvent(Component.java:44 13)
at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4556)
at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4220)
at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4150)
at java.awt.Container.dispatchEventImpl(Container.jav a:2085)
at java.awt.Component.dispatchEvent(Component.java:44 13)
at java.awt.EventQueue.dispatchEvent(EventQueue.java: 599)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122)