• Domingo 19 de Mayo de 2024, 17:16

Autor Tema:  Añadir A Un Frame  (Leído 858 veces)

brujota

  • Nuevo Miembro
  • *
  • Mensajes: 18
    • Ver Perfil
Añadir A Un Frame
« en: Jueves 20 de Julio de 2006, 11:39 »
0
Mi problema es como agregar un frame a un panel de otro frame.
Cargo un frame externo y lo quiero añadir al jPanel1.

public class Interfaz extends javax.swing.JFrame {

    public Interfaz() {
        initComponents();
    }

    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        getContentPane().setLayout(null);
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jPanel1.setLayout(null);
        jPanel1.add(jButton1);
        getContentPane().add(jPanel1);
        jPanel1.setBounds(0, 0, 390, 280);
        pack();
    }

    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Identificacion().setVisible(true);
            }
        });
    }

    private javax.swing.JPanel jPanel1;

}