FocusTraversalPolicy in a JFrame

From: Sergiohdezm (sergiohdezm_at_terra.es)
Date: 05/27/04

  • Next message: Steve W. Jackson: "Re: Adding Icon to a JLabel"
    Date: 27 May 2004 04:58:14 -0700
    
    

    Hi, I've created:

    public class MyFrame extends JFrame.

    It uses cardlayout, because I show one frame or another, depending on
    the situation. Each frame is in one independent file, and they extends
    JPanel. The problem is that I have created a class in one of the
    files:

    private class MyFocusTraversalPolicy extends FocusTraversalPolicy {
    .....
    }

    I wrote:

      this.setFocusTraversalPolicy(new MyFocusTraversalPolicy());

    but it doesn't work in the JPanel.

    How can I do that?

    Thanks.


  • Next message: Steve W. Jackson: "Re: Adding Icon to a JLabel"

    Relevant Pages

    • RE: how to instantiate the inner class.
      ... Instant VB: C# to VB.NET Converter ... > extends from Frame. ... The class which I inherited from the Frame class becomes ... > the inner class of the class extended from the Applet. ...
      (microsoft.public.dotnet.vjsharp)
    • Re: calling action function of the inner class in main function
      ... I have created the two classes one extends from Applet, ... The class which I inherited from the Frame class becomes ... call the functions of the class extended from Frame class - MenuBarFrame ...
      (microsoft.public.dotnet.vjsharp)
    • Re: Converting from AWT to Swing - Compile Error
      ... > I am converting an application from using AWT to swing. ... all I did was change Component to JComponent and Frame to ... Because an object of type JComonent can never be an instance of JFrame. ... JFrame extends Frame which extents Window which extends Container which ...
      (comp.lang.java.gui)
    • calling functions of the inner class- parameters of action functio
      ... I have created the two classes one extends from Applet, ... The class which I inherited from the Frame class becomes ... call the functions of the class extended from Frame class - MenuBarFrame ...
      (microsoft.public.dotnet.vjsharp)
    • how to instantiate the inner class.
      ... I have created the two classes one extends from Applet, ... The class which I inherited from the Frame class becomes ... public class MenuBarFrame extends Frame ...
      (microsoft.public.dotnet.vjsharp)