popup Jframe
Hi, i made a popup jframe,
but i dont know how to start it in my main Jframe
how can i call it? or start it?
i tried this:
RUN.NewJFrame NewJFrame = new RUN.NewJFrame();
it compile without problems but it dosnt show anything.
RUN is the package
NewJFrame is the popup frame i want to start
[339 byte] By [
Kimosa] at [2007-11-26 13:54:35]

sure:
package RUN;
public class Description extends javax.swing.JFrame {
/** Creates new form Description */
public Description() {
initComponents();
}
private void initComponents() {
DesktopPaneHum = new javax.swing.JDesktopPane();
ScrollPaneHum = new javax.swing.JScrollPane();
TextareaHum = new javax.swing.JTextArea();
ButtonHum = new javax.swing.JButton();
LabelHum = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
DesktopPaneHum.setBackground(new java.awt.Color(212, 208, 200));
TextareaHum.setColumns(20);
TextareaHum.setRows(5);
ScrollPaneHum.setViewportView(TextareaHum);
ScrollPaneHum.setBounds(10, 50, 320, 130);
DesktopPaneHum.add(ScrollPaneHum, javax.swing.JLayeredPane.DEFAULT_LAYER);
ButtonHum.setText("OK");
ButtonHum.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ButtonHumActionPerformed(evt);
}
});
ButtonHum.setBounds(130, 190, 49, 23);
DesktopPaneHum.add(ButtonHum, javax.swing.JLayeredPane.DEFAULT_LAYER);
LabelHum.setFont(new java.awt.Font("Tahoma", 1, 10));
LabelHum.setText("Please type little description about the human");
LabelHum.setBounds(50, 10, 280, 40);
DesktopPaneHum.add(LabelHum, javax.swing.JLayeredPane.DEFAULT_LAYER);
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(DesktopPaneHum, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 343, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(DesktopPaneHum, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 232, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>
private void ButtonHumActionPerformed(java.awt.event.ActionEvent evt) {
}
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Description().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton ButtonHum;
private javax.swing.JDesktopPane DesktopPaneHum;
private javax.swing.JLabel LabelHum;
private javax.swing.JScrollPane ScrollPaneHum;
private javax.swing.JTextArea TextareaHum;
// End of variables declaration
}
that was the new Jframe that should popup