[4332] in java-interest

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

Canvas as a container

daemon@ATHENA.MIT.EDU (Nik Barthelemy)
Tue Dec 19 03:03:13 1995

Date: Tue, 19 Dec 1995 15:11:37 +0900 (JST)
From: Nik Barthelemy <nbarthel@shrine.cyber.ad.jp>
To: java-interest@java.sun.com

I have been wishing that a canvas was a container lately.  Would it be 
possible to use the canvas peer from the toolkit in a subclass of 
container??  I want canvases in canvases in canvases (you can probably 
guess why) to take advantage of the lovely features of containers.

I want something like this:

class ContainerCanvas extends panel??
{
	public ContainerCanvas()
	{} // Super has no contstructor

	public CanvasPeer AddNotify()
	{
		...
	}
}

In other words just override addnotify in panel so thatr I can have an 
invisible (well canvasable, transparentable image) component.  I tried 
something like this with Container itself being the superclass and I got 
shot down.  It griped about there being no constructor for Container().  
But of course there isn't a constructor, it is an abstract class, no?

Any plans for containers like this?  I used panel cause its 
generic...ASny further thoughts?

-Nik

CONTACT: nbarthel@shrine.cyber.ad.jp ++ + "...shooting stars never stop
Nik Barthelemy ++++++++++++++++++++++ +  even when they hit the top!"
Cyber Technologies International +++++++++++++++++++++++++++++++by FrAnKiE    
Tokyo, Japan +++++++++++++++++++ + PHONE: (03) 3226-0961 / FAX (03) 3226-0962

-
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