<Swing Dev> RFR: 8272148: JDesktopPane:getComponentCount() returns one extra than expected with GTKLookAndFeel [v2]
Pankaj Bansal
pbansal at openjdk.java.net
Wed Aug 25 10:39:42 UTC 2021
On Mon, 23 Aug 2021 23:04:29 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> src/java.desktop/share/classes/javax/swing/JComponent.java line 185:
>>
>>> 183: * <p>
>>> 184: * Containers inherited from <code>JComponent</code> can contain any
>>> 185: * number of default components as children. This behaviour can also
>>
>> can we say "default or initial"
>
> Do we need to say "Containers inherited from JComponent"? For example, JComboBox is just a component, and it is not necessary will be used as a container by the user.
> I meant all components inherited from the JComponent are Containers per specification, but not all of them are used as such. And this new statement is applicable to all "JComponents".
I have changed default to "default or initial". I also changed "Containers inherited from JComponent" to just JComponent as I feel Sergey's point makes sense.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5121
More information about the swing-dev
mailing list