Dynamically Add Components to a JDialog
问题 I am having trouble adding JComponents to a JDialog when the user clicks a button on the JDialog. Basically I want it to look like this: Then, when the user clicks \"Add New Field\" I want it to look like this: I cannot seem to get the dialog to add the new JLabel or JTextField. Can anyone point me in the right direction? EDIT : This is the action for the \"Add New Field\" button (Just trying a label now). @Action public void addNewField() { Container contentPane = getContentPane(); JLabel