>> Does anybody know the reason why the constants in
>> javax.swing.ScrollPaneConstants are put in a separate class instead of
>> simply putting them inside javax.swing.JScrollPane itself?
>
> They are all gouged in one place, typically public static final, and
> accessed as MyClassDefaults.CONSTANT_VALUE.
Then how about the constants in java.awt.event.ActionEvent? Why didn't
they put them in ActionEventConstants? Is it because they only make it
a point to separate them from swing onwards?
Joseph Dionne - 06 May 2005 02:59 GMT
>>> Does anybody know the reason why the constants in
>>> javax.swing.ScrollPaneConstants are put in a separate class instead
[quoted text clipped - 6 lines]
> they put them in ActionEventConstants? Is it because they only make it
> a point to separate them from swing onwards?
Perhaps Java is showing its age? As use in a language increases,
drawing greater feed back, "proper" syntax evolves addressing common
complaints. But, Java tries to be "upwards" portable. Changing AWT at
1.3 or later would break every application developed prior. That is
what Microsoft does with annoying regularity. Sun changes API structure
breaking upward compatibility, i.e. depreciated notices, but gives
developers time to update source code while allowing them up use new
features in new product.
Joseph