How do I move from one GUI screen to the next using J2SE?

Hi, How do I move to another screen (JFrame) from an existing screen (JFrame) using a JButton as the trigger?
[124 byte] By [newtoJava] at [2007-9-26 1:54:29]
# 1
Try thisactionPerformed(ActionEvent event) {frame1.setVisible(false);frame2.setVisible(true);}
arabeleg at 2007-6-29 3:06:58 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
Thanks. If the screens are dependent on each other e.g. data displayed on one screen is used to trigger events on the next, what do I do?
newtoJava at 2007-6-29 3:06:59 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 3

There are hundreds of ways to do this, this one is

just a rather simple aproach

public void show(SomeType myParameter){

... do some work for preparing the Dialog for diplaying ...

this.setVisible(true);

and use this instead of the call to

frame2.setVisible(true)

Spieler

spieler at 2007-6-29 3:06:59 > top of Java-index,Archived Forums,New To Java Technology Archive...