I am creating a JFrame Form in Netbeans. I have an Employee table in database. What I am trying to do that when this page loads, it will display employees record row-wise in jframe form. I have dragged JPanel to JFrame, and added radiobuttons(for testing purposes only) into JPanel. But It is not displaying Radiobuttons which are generated at run-time!!! Is there anyway I can accomplish this? Here is my code:
public class ShowEmployees extends javax.swing.JFrame {
/** Creates new form ShowEmployees */
public ShowEmployees() {
initComponents();
for (int i = 0; i < 10; i++)
{
JRadioButton textField = new JRadioButton();
this.jPanel1.add( textField );
}
this.jPanel1.validate();
}
...
}