Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6218132

JTable demo throws an java.security.AccessControlException in SwingSet2 Demo App.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 5.0u2
    • client-libs

    Description

      Bug Info:
      ---------
      JTable demo throws an java.security.AccessControlException in SwingSet2(${JAVA_HOME}/demo/jfc/SwingSet2) demo application.


      Exception Details
      -----------------
      Exception in thread "AWT-EventQueue-1" java.security.AccessControlException: access denied (java.lang.RuntimePermission queuePrintJob)
              at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
              at java.security.AccessController.checkPermission(AccessController.java:427)
              at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
              at java.lang.SecurityManager.checkPrintJobAccess(SecurityManager.java:1355)
              at java.awt.print.PrinterJob.getPrinterJob(PrinterJob.java:48)
              at javax.swing.JTable.print(JTable.java:4345)
              at javax.swing.JTable.print(JTable.java:4236)
              at TableDemo.printTable(TableDemo.java:634)
              at TableDemo.access$000(TableDemo.java:69)
              at TableDemo$14.actionPerformed(TableDemo.java:317)
              at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
              at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
              at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
              at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
              at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
              at java.awt.Component.processMouseEvent(Component.java:5488)
              at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
              at java.awt.Component.processEvent(Component.java:5253)
              at java.awt.Container.processEvent(Container.java:1966)
              at java.awt.Component.dispatchEventImpl(Component.java:3955)
              at java.awt.Container.dispatchEventImpl(Container.java:2024)
              at java.awt.Component.dispatchEvent(Component.java:3803)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
              at java.awt.Container.dispatchEventImpl(Container.java:2010)
              at java.awt.Component.dispatchEvent(Component.java:3803)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


      JDK Info:
      ---------
      java version "1.5.0_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_02-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_02-b05, mixed mode)


      SwingSet2 Location
      ------------------
      ${JAVA_HOME}/demo/jfc/SwingSet2


      Steps to reproduce:
      -------------------

      1. Enter the following command in the console.

       ${JAVA_HOME}/bin/appletviewer ${JAVA_HOME}/demo/jfc/SwingSet2/swingSet2.html

      2. Click on table demo icon and then click on print button.

       
      Expected Behavior:
      ------------------

      The print dialog should be open.


      Actual Behavior:
      ----------------

      It thows an java.security.AccessControlException.

      ###@###.### 2005-1-17 11:42:15 GMT

      Attachments

        Activity

          People

            shickeysunw Shannon Hickey (Inactive)
            vthotasunw Vinay Thota (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: