[4984] in java-interest

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

Re: Observable problems

daemon@ATHENA.MIT.EDU (Walter Szewelanczyk)
Thu Jan 25 02:05:04 1996

From: "Walter Szewelanczyk" <Walter@stumpy.adco.com>
To: chris@telesph.com (Christopher Helck), java-interest@java.sun.com
Date: Thu, 25 Jan 1996 00:26:18 +0000


Hi Chris,

 
> I'm running into problems using the Observable class and the Observer interface.
> I have a class (call it Foo) which I would like to be Observable (when a button
> is pressed I need to tell two or more observers about it). I can't make Foo
> a sub-class of Observable because Foo already is a sub-class of Panel. I can't
> have Foo use Obserable (have an Observable instance as a member of Foo) because
> Observable.setChanged() and Observable.clearChanged() are protected functions
> and can only be called by sub-classes of Observable.


I may be way out of line but could you sub class the button and make 
that observable????


Walt 

********************************************************************************************
Walter Szewelanczyk					Technical Director 
Walter@adco.com						NET VENTURE, Inc.


	"One must stay in a very RIGID state of FLEXABILITY"

********************************************************************************************
-
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