Re: question# Java - 爪哇娇娃
o*d
1 楼
First of all, I am not a GUI expert. So maybe my way is not
the best way.
My way is you create a subclass of Frame, say, myFrame. This
class will inherit all the attributions and behaviors of
Frame. It also has its only private member: Applet a; The
constructor of myFrame will get a reference of your parent
applet and put it in that private member. Later you can call
a.repaint() to update the parent Applet.
the best way.
My way is you create a subclass of Frame, say, myFrame. This
class will inherit all the attributions and behaviors of
Frame. It also has its only private member: Applet a; The
constructor of myFrame will get a reference of your parent
applet and put it in that private member. Later you can call
a.repaint() to update the parent Applet.