Witam czy istnieje możliwość wywołania frame (new frame2().setVisible(true)) po czym
w frame2, ustawic wartosc pola oraz je przekazać do frame który go wywołał?
Próbowałem cos takiego:
// frame 1
Button() // wyświetlany frame 2
{ new frame2().setVisible(true);
}
Void wys()
{ jLabel1.setText( new frame2().pobierz());
}
// frame 2
String Pobierz ()
{ return jTextField1.getText();
}
Button() // zamknij frame 2
{ this.dispose();
}
Bardzo proszę nie zwracać na styl oraz język pisowni.
// edit koziołek: używaj tagów < code >