ako sam te bobro razumeo ...
prosledi kao parametar konstruktora forme A formu B i onda je sacuvaj kao promenljivu i zati kad ti treba nesto iz forme B ti pozoves get metodu za to sta ti treba
Code:
class A{
private B b;
public A(B b){
this.b = b;
}
public void nestoPametno(){
b.getFf1().setText("ovo je iz klase A cackano:)");
}
}
class A{
private JTextFileld tf1;
private JTextFileld tf2;
public JTextFileld getTf2(){
return tf2;
}
public JTextFileld getTf1(){
return tf1;
}
}
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. - Dennis Ritchie