As per the class hierarchy in java.awt.*
, class Button
& class Label
is-a
class Component
, and Component is not a Container, which make sense to me.
As per the redesign of class hierarchy in javax.swing.*
, class JButton
is-a
class JComponent
in-turn class JComponent
is-a class Container
,
So, What does it mean to say that, class JButton
or class JRadioButton
is-a
class Container
? How could one think of using button or radiobutton as container in GUI programming?
Note: I am java beginner.