• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1723
  • Last Modified:

java.awt.AWTPermission setWindowAlwaysOnTop

I have a java program with a JFrame and when I set it to - JFrame.setAlwaysOnTop(true); I get this error when on the web:

 Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.awt.AWTPermission setWindowAlwaysOnTop)
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at java.awt.Window.setAlwaysOnTop(Unknown Source)
      at UI$mAction.actionPerformed(UI.java:327)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.AbstractButton.doClick(Unknown Source)
      at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
      at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)

Is there a way to use this command when on the web?

Thanks,

waffe
0
waffe
Asked:
waffe
  • 3
  • 2
1 Solution
 
objectsCommented:
you'll need to sign the applet
0
 
waffeAuthor Commented:
Hmm... A lot of work for a simple process; would JWindow or Dialog work in this manner and be able to stay on top of all other windows without singing the applet?

waffe
0
 
objectsCommented:
no JDialog would just stay on top of its parent.

Reasoning for the security restriction is so uninvited applet don't force windows to display on top of your other windows.
0
 
waffeAuthor Commented:
> no JDialog would just stay on top of its parent.

how about JWindow?
0
 
objectsCommented:
same sorry
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now