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

JPanel looses keyboard focus for secure applets using JavaScript calls

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2_02
    • Fix Version/s: None
    • Component/s: deploy
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      A JPanel created after a JavaScript call is made into an Applet will
      not receive keyboard focus.

      The attached KeyboardTest.java and Test.html files demonstrate the
      problem as long as the applet was signed or if a new policy was added to
      lib\security\java.policy file as adding:
      --------------------------
      permission java.security.AllPermission;
      --------------------------
      right after the "grant {" line.


      The applet embeds a JTextArea into a JPanel, then adds the JPanel
      to the applet's content pane. All keyboard entry is trapped by
      the JPanel KeyListener, and entered into the JTextArea.

      The first time the TextAreaJPanel is added to the applet
      everything works fine, when you click on the JavaScript link, the
      previous JPanelTextArea is removed and a new one is loaded. From
      this point on the JPanelTextArea no longer receives keyboard input.
      If you have the Java Console open when you are running the applet
      it will display something like the folllowing:


      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      Java(TM) Plug-in: Version 1.4.2_02
      Using JRE version 1.4.2_02 Java HotSpot(TM) Client VM
      User home directory = E:\WINNT\Profiles\szaboa.000 Proxy Configuration: No
      proxy ----------------------------------------------------
      c: clear console window
      f: finalize objects on finalization queue
      g: garbage collect
      h: display this help message
      l: dump classloader list
      m: print memory usage
      o: trigger logging
      p: reload proxy configuration
      q: hide console
      r: reload policy configuration
      s: dump system properties
      t: dump thread list
      v: dump thread stack
      x: clear classloader cache
      0-5: set trace level to <n>
      ----------------------------------------------------
      java.awt.DefaultKeyboardFocusManager@51052d
      java.awt.DefaultKeyboardFocusManager@d85cc


      Indicating that the KeyboardFoucusManager has been replaced prior
      to JavaScript calling the applet's loadNewJPanel method. This
      behavior illustrates the failure,

      The problem only occurs with the Internet Explorer browser (used IE version: 6.00.2462.0000)
      and on Microsoft Windows operation systems.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              djayaramsunw Devananda Jayaraman (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: