hi
this is jus a question. if you are doing a program that uses a GUI, with the radiobutton, checkboxes and so on
why do you have add an import for all the jradiobutton and jcheckbox. is is necessary to add an import for each of them
divinity02
6
Posting Whiz in Training
Recommended Answers
Jump to Post
import
is optional.
You can always code the fully-qualified namejavax.swing.JRadioButton
every time you need it, but that can be very tedious.
So you have the option toimport javax.swing.JRadioButton
at the start of your .java file and then you can just use the short nameJRadioButton
Similarly you can …
Jump to PostIt's the same answer for any class in the Java API.
All 5 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
divinity02
6
Posting Whiz in Training
divinity02
6
Posting Whiz in Training
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.