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