When creating a GUI, I was wondering what was the typical way of doing
things. How do you "connect" the differents parts that make up the GUI.
Is it done like the sample code I've supplied below or am I way off? Do
you declare all the main elements that make up the GUI as public members
that can then be accessed from all other functions within the class?
Good advice and links would be appreciated.
BTW. It's regarding to applets and AWT if it makes any difference.
class Bottom extends Panel {
// left out
}
class Top extends Panel {
// left out
}
public class GUI {
Top top;
Bottom bottom;
public void init() {
setLayout(new BorderLayout());
Top top = new Top;
top.labelText.text = "blah blah blah";
add("North", top);
Bottom bottom = new Bottom();
add("South", bottom);
}
// called from somewhere
some_method() {
top.labelText.text = "not blah blah blah";
}
}
Steven T Abell - 08 Sep 2003 17:08 GMT
> How do you "connect" the differents parts that make up the GUI.
http://developer.netscape.com/docs/technote/simple/index.html
Steve

Signature
Steven T Abell
Software Designer
http://www.brising.com
In software, nothing is more concrete than a good abstraction.