[1922] in java-interest

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

Re: AWT instance variables

daemon@ATHENA.MIT.EDU (Arthur van Hoff)
Wed Sep 20 00:11:39 1995

Date: Tue, 19 Sep 1995 18:29:50 -0700
From: Arthur van Hoff <avh@Eng.Sun.COM>
To: Ed Grossman <egrossma@ncsa.uiuc.edu>
Cc: java-interest@java.Eng.Sun.COM

Hi Ed,

> I'm interested in why the AWT developers, upon removing the public instance
> variables, made access on most of them the default, ie private outside the
> package.  I've just started to write a few subclasses, and have quickly
> discovered that the ramifications of this decision seem to be that I cannot
> get access to my superclass' instance variables unless I put my new class
> in the same package.  In that case, however, I have access to pretty much
> any instance variable in the entire AWT.  Could one of the developers give
> some idea of how they expect these classes to be reused?

All the require instance variables are accessible through accessor
methods. We chose to do it this way because it makes it harder to
'accidentally' screw up the state of AWT components. We obviously
want people to use these classes, but you should not stick new classes
in the awt package.

Have fun,

	Arthur van Hoff
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

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