TEnho o codigo abaixo e tento chamar um JInternalFrame e o mesmo não abre e tbm não da msg de erro.
Alguem poderia me ajudar?
Grato Renato V. Neto
public class JFrame_1 extends javax.swing.JFrame {
/** Creates new form JFrame_1 */
public JFrame_1() {
initComponents();
}
/** 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.
*/
private void initComponents() {
jDesktopPane1 = new javax.swing.JDesktopPane();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
getContentPane().setLayout(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
jDesktopPane1.addContainerListener(new java.awt.event.ContainerAdapter() {
public void componentAdded(java.awt.event.ContainerEvent evt) {
jDesktopPane1ComponentAdded(evt);
}
});
jButton1.setBackground((java.awt.Color) javax.swing.UIManager.getDefaults().get("Button.focus"));
jButton1.setIcon(new javax.swing.ImageIcon("C:\RenatoJava\Imobille\shutdown.gif"));
jButton1.setText("Logout");
jButton1.setBorder(new javax.swing.border.CompoundBorder());
jButton1.setBorderPainted(false);
jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jButton1.setRolloverEnabled(true);
jButton1.setRolloverIcon(new javax.swing.ImageIcon("C:\RenatoJava\Imobille\shutdown1.gif"));
jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jButton1.setBounds(710, 490, 81, 70);
jDesktopPane1.add(jButton1, javax.swing.JLayeredPane.DEFAULT_LAYER);
jButton2.setBackground((java.awt.Color) javax.swing.UIManager.getDefaults().get("Button.focus"));
jButton2.setIcon(new javax.swing.ImageIcon("C:\RenatoJava\Imobille\angariacao.gif"));
jButton2.setText("Angariau00e7u00e3o");
jButton2.setBorder(new javax.swing.border.CompoundBorder());
jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton2.setBounds(40, 20, 100, 90);
jDesktopPane1.add(jButton2, javax.swing.JLayeredPane.DEFAULT_LAYER);
getContentPane().add(jDesktopPane1);
jDesktopPane1.setBounds(0, 0, 800, 600);
pack();
}
private void jDesktopPane1ComponentAdded(java.awt.event.ContainerEvent evt) {
// Add your handling code here:
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
new Angariacao().show(); // Botão que deveria chamar um frame
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
new JFrame_1().show();
}
// Variables declaration - do not modify
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton1;
private javax.swing.JDesktopPane jDesktopPane1;
// End of variables declaration
}