|
There is something I am not getting here!
Class A //sound blocks data
B b = new B();
b.whateverMethod(); //of class B
Cass B extends JPanel //GUI listeners buttons etc.
There happens an event in class B (at any time!!!) how this can be noted in A???
e.g. listener sets boolean midipedal to true
public boolean getMidiped() { // at class B
return midipedal;
}
At class A I could ask for b.getMidiped() and it will return the correct true or false of the var. BUT I DO NOT KNOW WHEN THAT WILL HAPPEN FROM INSIDE THE CODE OF CLASS A SO THAT IS WHY I NEED A LOOP TO WAIT THIS TO HAPPEN......... OR NOT???
|