[4329] in java-interest

home help back first fref pref prev next nref lref last post

Component, Containers, Windows, Frames

daemon@ATHENA.MIT.EDU (Richard Williamson)
Mon Dec 18 20:54:34 1995

From: Richard Williamson <richwill@infoscape.com>
Date: Mon, 18 Dec 95 14:49:04 -0800
To: java-interest@java.sun.com

Does any documentation, other than the API, exist for the java.awt  
package?

From what I've been able to glean several things strike me as  
somewhat odd about this architecture.

1.  Windows require a Frame as an argument in their constructor.   
Frame is a subclass of Window.  This appears to be somewhat  
topsy-turvy.  You need an instance of subclass to construct the  
super class.

2.  Windows and Frames (and Applets) inherit from Container and  
Component.  Containers contain Components, yet it doesn't really  
make sense to add a Container to a container, does it?  i.e.

In an attempt top open a window, I naively tried something  
essentially like the following in the init() method of an applet:

    public void init() {
	...
	
	aFrame = new Frame();
	aFrame.resize (400,400);
	aFrame.move (100,100);
	add(aFrame);
	aFrame.show();

	...
	}

Two windows appeared!!

Any guidance would be appreciated.

- Richard Williamson
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post