Re-export the layout and edit the source code

Because you changed the 'Test Frame' layout (added the ActionListener), you need to re-export it.
Select 'Layout | Export Layout Class' or click the 'Export Layout Class' button in the RADi toolbar.
Note: Whenever you added or removed components, whenever you added or removed Actions or EventListeners, you should re-export the layout (else changes are not reflected in the Java code).
Don't change any settings in the "Export Layout Classes' dialog, just press [Export].
Refresh your IDE, so it loads the changed TestFrame.java code.
Display TestFrame.java in your IDE's editor and scroll to the following section:
  The showDialog() method will be called when the button is pressed
Now write the code which displays the dialog:
We call the inherited JDialog(Frame owner, boolean modal) constructor with arguments of this and true.
See also: Exporting layout classes