The Swing components located in package javax.swing.* and are Java answers to create a better
Graphical User Interface.
I search about component,But I cann’t understand it.What does it mean?What does container in swing mean?
The Swing components located in package javax.swing.* and are Java answers to create a better
Graphical User Interface.
I search about component,But I cann’t understand it.What does it mean?What does container in swing mean?
Component: an artifact that is one of the individual parts of which a composite entity is made up; especially a part that can be separated from or attached to a system.
eg: A JTextField can be a component of a Swing application.
Container: Simply, a component that can contain other components.
eg: To build a GUI, we place JButtons, et al, into a JFrame.
an artifact that is one of the individual parts of which a composite entity is made up; especially a part that can be separated from or attached to a system.
Still don’t understand. May you explain it simply?
s, i, m, p, l, and y are all components of the word ‘simply’
need the answer
Perhaps you’re over-thinking it?
The ‘simply’ analogy, while seemingly sarcastic, is actually a good example of components being used together to create a system. Those same components can be used again, in a different context, to build other systems as well.
s,l,y,i,m,p
May you give me example of component? and match your definition with it?
I thought that’s exactly what rushiku had done back in post #2
A component is a part or piece of something else.
i.e. the letters s,i,m,p,l,y are parts - components - of the word simply.
Re: your OP, The Swing components i.e. the various files, code etc. that make up Swing, are in the javax.swing.* package. Which seems to be a rather obvious statement, that is, I would hope they wouldn’t be scattered about here and there.
An analogy, a fan assembly is a component of a computer, a screw is a component of a fan assembly.
Then even package is a component for swing, Because it is part of it.
javax.swing.event
Or a method or a class in a program is a component because it is part of that?
Literally, yes, anything that is part of a larger system is a component of that system.
In regards to Swing (actually, awt) Components, they are, generally, the gadgets that are used to make the GUI, so, no, javax.swing.event is not a descendant of the Object Component even though it is a (literal) component of Swing.
(for the purposes of clarity, capitalization is important)