View Single Post
  #12 (permalink)  
Old 09-03-2008, 08:05 PM
willemjav willemjav is offline
Senior Member
 
Join Date: Dec 2007
Location: Spain
Posts: 342
willemjav is on a distinguished road
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???
Reply With Quote