bom dia a todos..
eu tenho um jinternalframe
e tenho um jpainel
nao consigo adicional o meu painel "painalexemplo" no jinternalframe
alguem pode me explicar?
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package master00java;
import java.awt.Dimension;
import javax.swing.JFrame;
/**
*
* @author Admin
*/
public class PainalPrincipal extends javax.swing.JInternalFrame {
private JFrame frame;
PainelExemplo painelexemplo=null;
public PainelPrincipal(JFrame frame) {
this.frame = frame;
painelexemplo = new painelexemplo(frame);
painelexemplo.setVisible(true);
initComponents();
// this.add(painelexemplo); // ja tentei adicionar assim
this.getContentPane().add(painelexemplo); // e com esta linha tambem nao mostra
}
/**
* 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")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
formMouseClicked(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 696, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 669, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
private void formMouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
}
// Variables declaration - do not modify
// End of variables declaration
}
