Duvida sobre panel com swing

Estou fazendo uma aplicação que contem um jframe(Painel principal) e dentro dele eu estou dividindo a tela com 2 jpanel um inferior(JpanelInferior) e outro superior(JpanelSuperior). Nesses jpanel eu coloco 1 form panel no superior(FormPanelSuperior) e no inferior(FormPanelInferior). Eu faço isso por questões de estética pois consigo fazer alguns efeitos visuais mais “Bonitinhos com eles”. O grande problema é que depois de colocar os 2 form panel nos jpanel eu não estou conseguindo usar o requestfocus e o keyPressed. Por exemplo antes chamar os 2 form panel eu consigo usar o keypressed. Depois de chamar os panel não funciona mais. E não consigo usar o requestfocus para um textfild que fica no FormPanelInferior. Ele teria que ser inicializado junto com o FormPanelInferiro para aplicar o requestFocus, mesmo eu colocando no construtor o jtfCodigo.requestFocus(); ele ainda não inicia com o foco.
Então estou com essas 2 duvidas
1º KeyPressed não funciona mais depois de chamar os form panel
2º Não consigo usar o requestFocus depois de chamar os form panel.

Sou iniciante e mesmo procurando na net não achei nada sobre isso. Alguém poderia me dar um help?

Posta seu código fonte

Esse é o meu codigo do do painel principal.

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package view;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.AbstractAction;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JRootPane;
import javax.swing.KeyStroke;
import panels.PanelInferiorCaixaAberto;
import panels.PanelInferiorCaixaFechado;
import panels.PanelSuperiorCaixaAbertoDentroMesa;
import panels.PanelSuperiorCaixaAbertoMesas;

/**
*

  • @author Usuario
    */
    public class FrenteLoja extends javax.swing.JFrame {

    public FrenteLoja() {
    initComponents();
    //inicia com a tela no centro
    setLocationRelativeTo(null);

     //inserindo o painel inferior de caixa fechado
     PanelInferiorCaixaFechado cxf = new PanelInferiorCaixaFechado();
     cxf.setSize(1400,400);
     //cxf.setLocation(5,5);
     jpanelInferior.removeAll();
     jpanelInferior.add(cxf, BorderLayout.CENTER);
     jpanelInferior.revalidate();
     jpanelInferior.repaint();
     this.setName("FrenteLoja");
     
     fecharTelaComESC();
    

    }

    /**

    • This method is called from within the constructor to initialize the form.

    • WARNING: Do NOT modify this code. The content of this method is always

    • regenerated by the Form Editor.
      */
      @SuppressWarnings(“unchecked”)
      //
      private void initComponents() {

      jpanelSuperior = new javax.swing.JPanel();
      jlblFechar = new javax.swing.JLabel();
      jpanelInferior = new javax.swing.JPanel();

      setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
      setUndecorated(true);
      addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
      public void mouseDragged(java.awt.event.MouseEvent evt) {
      formMouseDragged(evt);
      }
      });
      addMouseListener(new java.awt.event.MouseAdapter() {
      public void mousePressed(java.awt.event.MouseEvent evt) {
      formMousePressed(evt);
      }
      });
      addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      formKeyPressed(evt);
      }
      });

      jpanelSuperior.setBackground(new java.awt.Color(255, 255, 255));
      jpanelSuperior.setPreferredSize(new java.awt.Dimension(1400, 500));

      jlblFechar.setFont(new java.awt.Font(“Segoe UI”, 1, 24)); // NOI18N
      jlblFechar.setForeground(new java.awt.Color(57, 113, 177));
      jlblFechar.setText(“X”);
      jlblFechar.addMouseListener(new java.awt.event.MouseAdapter() {
      public void mouseClicked(java.awt.event.MouseEvent evt) {
      jlblFecharMouseClicked(evt);
      }
      });

      javax.swing.GroupLayout jpanelSuperiorLayout = new javax.swing.GroupLayout(jpanelSuperior);
      jpanelSuperior.setLayout(jpanelSuperiorLayout);
      jpanelSuperiorLayout.setHorizontalGroup(
      jpanelSuperiorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpanelSuperiorLayout.createSequentialGroup()
      .addContainerGap(1379, Short.MAX_VALUE)
      .addComponent(jlblFechar)
      .addGap(5, 5, 5))
      );
      jpanelSuperiorLayout.setVerticalGroup(
      jpanelSuperiorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jpanelSuperiorLayout.createSequentialGroup()
      .addGap(1, 1, 1)
      .addComponent(jlblFechar)
      .addContainerGap(467, Short.MAX_VALUE))
      );

      jpanelInferior.setPreferredSize(new java.awt.Dimension(1400, 400));

      javax.swing.GroupLayout jpanelInferiorLayout = new javax.swing.GroupLayout(jpanelInferior);
      jpanelInferior.setLayout(jpanelInferiorLayout);
      jpanelInferiorLayout.setHorizontalGroup(
      jpanelInferiorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGap(0, 1400, Short.MAX_VALUE)
      );
      jpanelInferiorLayout.setVerticalGroup(
      jpanelInferiorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGap(0, 400, Short.MAX_VALUE)
      );

      javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
      getContentPane().setLayout(layout);
      layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jpanelSuperior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(jpanelInferior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(0, 0, Short.MAX_VALUE))
      );
      layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createSequentialGroup()
      .addComponent(jpanelSuperior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGap(0, 0, 0)
      .addComponent(jpanelInferior, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGap(0, 0, Short.MAX_VALUE))
      );

      pack();
      }//

    private void jlblFecharMouseClicked(java.awt.event.MouseEvent evt) {
    System.exit(0);

    }
    int xx;
    int xy;

    private void formMouseDragged(java.awt.event.MouseEvent evt) {
    int x = evt.getXOnScreen();
    int y = evt.getYOnScreen();
    this.setLocation(x-xx, y-xy);
    }

    private void formMousePressed(java.awt.event.MouseEvent evt) {
    xx = evt.getX();
    xy = evt.getY();
    }

    private void formKeyPressed(java.awt.event.KeyEvent evt) {
    if ((evt.getKeyCode() == KeyEvent.VK_F5) && ((evt.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
    AberturaFechamentoCaixa janela = new AberturaFechamentoCaixa();
    janela.setVisible(true);
    }if ((evt.getKeyCode() == KeyEvent.VK_F1) ) {

                 //aqui eu tenho que apertão o botão f1 e o foco ir para o jtextfild jtfMesa que fica no jform PanelInferiorCaixaAberto
                 
                 }
    

    }

    /**

    • @param args the command line arguments
      /
      public static void main(String args[]) {
      /
      Set the Nimbus look and feel /
      //
      /
      If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

      • For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
        */
        try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
        if (“Nimbus”.equals(info.getName())) {
        javax.swing.UIManager.setLookAndFeel(info.getClassName());
        break;
        }
        }
        } catch (ClassNotFoundException ex) {
        java.util.logging.Logger.getLogger(FrenteLoja.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
        java.util.logging.Logger.getLogger(FrenteLoja.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
        java.util.logging.Logger.getLogger(FrenteLoja.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(FrenteLoja.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //

      /* Create and display the form */
      java.awt.EventQueue.invokeLater(new Runnable() {
      public void run() {
      new FrenteLoja().setVisible(true);
      }
      });
      }

    public void fecharTelaComESC() {
    JRootPane meurootpane = getRootPane();
    meurootpane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), “ESCAPE”);
    meurootpane.getRootPane().getActionMap().put(“ESCAPE”, new AbstractAction(“ESCAPE”) {
    public void actionPerformed(ActionEvent e) {
    System.exit(0);
    }
    });
    }

    // Variables declaration - do not modify
    private javax.swing.JLabel jlblFechar;
    public static javax.swing.JPanel jpanelInferior;
    public static javax.swing.JPanel jpanelSuperior;
    // End of variables declaration

}

Dentro do private void formKeyPressed eu qria fazer o evento de foco no textfild mesa que fica em outro panel.

/*

  • To change this license header, choose License Headers in Project Properties.
  • To change this template file, choose Tools | Templates
  • and open the template in the editor.
    */
    package panels;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import javax.swing.AbstractAction;
import javax.swing.JComponent;
import javax.swing.JRootPane;
import javax.swing.KeyStroke;
import javax.swing.Timer;
import view.AbrirCaixa;
import static view.FrenteLoja.jpanelSuperior;

/**
*

  • @author Usuario
    */
    public class PanelInferiorCaixaAberto extends javax.swing.JPanel {

    /**

    • Creates new form PanelInferiorCaixaAberto
      */
      public PanelInferiorCaixaAberto() {
      initComponents();

      jtfCodigo.requestFocus();

      //colocando data no jtextfild
      Date dataSistema = new Date();
      SimpleDateFormat formato = new SimpleDateFormat(“dd/MM/yyyy”);
      jtfData.setText(formato.format(dataSistema));

      //colocando a hora
      Timer timer = new Timer(1000, new hora());
      timer.start();

    }

    /**

    • This method is called from within the constructor to initialize the form.

    • WARNING: Do NOT modify this code. The content of this method is always

    • regenerated by the Form Editor.
      */
      @SuppressWarnings(“unchecked”)
      //
      private void initComponents() {

      jPanel1 = new javax.swing.JPanel();
      jtfMesa = new javax.swing.JTextField();
      jLabel1 = new javax.swing.JLabel();
      JtfAtendente = new javax.swing.JTextField();
      jLabel2 = new javax.swing.JLabel();
      jLabel3 = new javax.swing.JLabel();
      jLabel4 = new javax.swing.JLabel();
      jLabel5 = new javax.swing.JLabel();
      jLabel6 = new javax.swing.JLabel();
      jtfQuantidade = new javax.swing.JTextField();
      jtfCodigo = new javax.swing.JTextField();
      jtfNome = new javax.swing.JTextField();
      jtfAdicional = new javax.swing.JTextField();
      jLabel7 = new javax.swing.JLabel();
      jtfPeriodo = new javax.swing.JTextField();
      jLabel8 = new javax.swing.JLabel();
      jtfCaixa = new javax.swing.JTextField();
      jLabel9 = new javax.swing.JLabel();
      jtfData = new javax.swing.JTextField();
      jLabel10 = new javax.swing.JLabel();
      jtfHora = new javax.swing.JTextField();
      jLabel11 = new javax.swing.JLabel();
      jLabel12 = new javax.swing.JLabel();

      setMinimumSize(new java.awt.Dimension(1400, 400));

      jPanel1.setBackground(new java.awt.Color(255, 255, 255));

      jtfMesa.setFont(new java.awt.Font(“Tahoma”, 0, 60)); // NOI18N
      jtfMesa.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      jtfMesaKeyPressed(evt);
      }
      });

      jLabel1.setFont(new java.awt.Font(“Segoe UI”, 1, 24)); // NOI18N
      jLabel1.setText(“Mesa”);

      JtfAtendente.setFont(new java.awt.Font(“Tahoma”, 0, 90)); // NOI18N
      JtfAtendente.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      JtfAtendenteKeyPressed(evt);
      }
      });

      jLabel2.setFont(new java.awt.Font(“Segoe UI”, 1, 24)); // NOI18N
      jLabel2.setText(“Atendente”);

      jLabel3.setFont(new java.awt.Font(“Segoe UI”, 0, 18)); // NOI18N
      jLabel3.setText(“Quantidade”);

      jLabel4.setFont(new java.awt.Font(“Segoe UI”, 0, 18)); // NOI18N
      jLabel4.setText(“Codigo”);

      jLabel5.setFont(new java.awt.Font(“Segoe UI”, 0, 24)); // NOI18N
      jLabel5.setText(“Nome”);

      jLabel6.setFont(new java.awt.Font(“Segoe UI”, 0, 24)); // NOI18N
      jLabel6.setText(“Adicional”);

      jtfQuantidade.setEditable(false);
      jtfQuantidade.setFont(new java.awt.Font(“Segoe UI”, 1, 18)); // NOI18N
      jtfQuantidade.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      jtfQuantidadeKeyPressed(evt);
      }
      });

      jtfCodigo.setEditable(false);
      jtfCodigo.setFont(new java.awt.Font(“Segoe UI”, 1, 18)); // NOI18N
      jtfCodigo.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      jtfCodigoKeyPressed(evt);
      }
      });

      jtfNome.setEditable(false);
      jtfNome.setFont(new java.awt.Font(“Segoe UI”, 0, 36)); // NOI18N
      jtfNome.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      jtfNomeKeyPressed(evt);
      }
      });

      jtfAdicional.setEditable(false);
      jtfAdicional.setFont(new java.awt.Font(“Segoe UI”, 0, 18)); // NOI18N
      jtfAdicional.addKeyListener(new java.awt.event.KeyAdapter() {
      public void keyPressed(java.awt.event.KeyEvent evt) {
      jtfAdicionalKeyPressed(evt);
      }
      });

      jLabel7.setText(“Periodo:”);

      jtfPeriodo.setEditable(false);
      jtfPeriodo.setBackground(new java.awt.Color(255, 255, 255));
      jtfPeriodo.setBorder(null);

      jLabel8.setText(“Caixa:”);

      jtfCaixa.setEditable(false);
      jtfCaixa.setBackground(new java.awt.Color(255, 255, 255));
      jtfCaixa.setBorder(null);

      jLabel9.setText(“Data:”);

      jtfData.setEditable(false);
      jtfData.setBackground(new java.awt.Color(255, 255, 255));
      jtfData.setFont(new java.awt.Font(“Tahoma”, 1, 12)); // NOI18N
      jtfData.setBorder(null);

      jLabel10.setText(“Horário:”);

      jtfHora.setEditable(false);
      jtfHora.setBackground(new java.awt.Color(255, 255, 255));
      jtfHora.setFont(new java.awt.Font(“Tahoma”, 1, 12)); // NOI18N
      jtfHora.setBorder(null);

      jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_lupa.png"))); // NOI18N
      jLabel12.setText(“Pesquisar pelo nome”);

      javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
      jPanel1.setLayout(jPanel1Layout);
      jPanel1Layout.setHorizontalGroup(
      jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGap(38, 38, 38)
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
      .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
      .addComponent(jtfQuantidade))
      .addGap(57, 57, 57)
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jLabel4)
      .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))
      .addComponent(jLabel6)
      .addComponent(jtfAdicional, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jtfNome, javax.swing.GroupLayout.PREFERRED_SIZE, 350, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(jLabel5))
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jLabel12)
      .addComponent(jLabel11)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addComponent(jLabel7)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(jtfPeriodo, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(jLabel8)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(jtfCaixa, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(jLabel9)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(jtfData, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(jLabel10)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(jtfHora, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))))
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 117, Short.MAX_VALUE)
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
      .addComponent(jtfMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addComponent(jLabel2)
      .addGap(37, 37, 37)))
      .addGap(170, 170, 170))
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
      .addComponent(JtfAtendente, javax.swing.GroupLayout.PREFERRED_SIZE, 340, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGap(79, 79, 79))
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
      .addComponent(jLabel1)
      .addGap(237, 237, 237))))
      );
      jPanel1Layout.setVerticalGroup(
      jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGap(20, 20, 20)
      .addComponent(jLabel3))
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
      .addContainerGap()
      .addComponent(jLabel1)))
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(jtfMesa, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
      .addComponent(jLabel2)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
      .addComponent(JtfAtendente, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGap(38, 38, 38))
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
      .addComponent(jLabel11)
      .addGap(196, 196, 196))
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addGap(20, 20, 20)
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
      .addComponent(jtfQuantidade, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addGroup(jPanel1Layout.createSequentialGroup()
      .addComponent(jLabel4)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
      .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
      .addGap(18, 18, 18)
      .addComponent(jLabel5)
      .addGap(14, 14, 14)
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
      .addComponent(jLabel12)
      .addComponent(jtfNome, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE))
      .addGap(18, 18, 18)
      .addComponent(jLabel6)
      .addGap(18, 18, 18)
      .addComponent(jtfAdicional, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
      .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
      .addComponent(jtfPeriodo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(jLabel8)
      .addComponent(jtfCaixa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(jLabel9)
      .addComponent(jtfData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
      .addComponent(jLabel10)
      .addComponent(jtfHora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
      .addContainerGap())
      );

      javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
      this.setLayout(layout);
      layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
      );
      layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
      );
      }//

    private void jtfQuantidadeKeyPressed(java.awt.event.KeyEvent evt) {
    int pressionada = evt.getKeyCode();
    int tecla = KeyEvent.VK_ENTER;

     if(pressionada == tecla){
         jtfCodigo.requestFocus();
     }
    

    }

    private void jtfCodigoKeyPressed(java.awt.event.KeyEvent evt) {
    int pressionada = evt.getKeyCode();
    int tecla = KeyEvent.VK_ENTER;

     if(pressionada == tecla){
         jtfNome.requestFocus();
     }
    

    }

    private void jtfNomeKeyPressed(java.awt.event.KeyEvent evt) {
    int pressionada = evt.getKeyCode();
    int tecla = KeyEvent.VK_F1;

     if(pressionada == tecla){
         jtfAdicional.requestFocus();
     }
    

    }

    private void jtfAdicionalKeyPressed(java.awt.event.KeyEvent evt) {
    // int pressionada = evt.getKeyCode();
    // int tecla = KeyEvent.VK_ENTER;
    //
    // if(pressionada == tecla){
    // jtfNome.requestFocus();
    // }
    }

    private void jtfMesaKeyPressed(java.awt.event.KeyEvent evt) {
    int pressionada = evt.getKeyCode();
    int tecla = KeyEvent.VK_ENTER;

     if(pressionada == tecla){
         JtfAtendente.requestFocus();
    
     
     }
    

    }

    private void JtfAtendenteKeyPressed(java.awt.event.KeyEvent evt) {
    int pressionada = evt.getKeyCode();
    int tecla = KeyEvent.VK_ENTER;

     if(pressionada == tecla){
           PanelSuperiorCaixaAbertoDentroMesa cxA1 = new PanelSuperiorCaixaAbertoDentroMesa();
     cxA1.setSize(1400,500);
     //cxf.setLocation(5,5);
     jpanelSuperior.removeAll();
     jpanelSuperior.add(cxA1, BorderLayout.CENTER);
     jpanelSuperior.revalidate();
     jpanelSuperior.repaint();
     ativarJTextFilds(true);
     jtfCodigo.requestFocus();
     jtfQuantidade.setText("1");
     }
    

    }

    private void ativarJTextFilds(boolean a){
    jtfNome.setEditable(a);
    jtfAdicional.setEditable(a);
    jtfQuantidade.setEditable(a);
    jtfCodigo.setEditable(a);
    }

    class hora implements ActionListener{
    @Override
    public void actionPerformed(ActionEvent e){
    Calendar now = Calendar.getInstance();
    jtfHora.setText(String.format("%1$tH:%1$tM:%1$tS", now));
    }
    }

    public void RequesitarFocoNoCampoMesa(){

     jtfMesa.requestFocus();
    

    }

    // Variables declaration - do not modify
    private javax.swing.JTextField JtfAtendente;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JTextField jtfAdicional;
    private javax.swing.JTextField jtfCaixa;
    private javax.swing.JTextField jtfCodigo;
    private javax.swing.JTextField jtfData;
    private javax.swing.JTextField jtfHora;
    private javax.swing.JTextField jtfMesa;
    private javax.swing.JTextField jtfNome;
    private javax.swing.JTextField jtfPeriodo;
    private javax.swing.JTextField jtfQuantidade;
    // End of variables declaration
    }

Esse é o codigo do meu panel inferior onde eu gostaria que o campo mesa recebesse foco ao ser pressionado f1.