1. Explain the purpose of GUI programming? 2. What are the classes (choose eithe
ID: 3760611 • Letter: 1
Question
1. Explain the purpose of GUI programming?
2. What are the classes (choose either Swing, or JFC) used to accomplish the following, and demonstrate the use of those classes. You do not need to submit working module, but include small snipped of code on how to create, or use each.
1. Panel - its purpose, how to create it, and use it.
2. Check box - its purpose, how to create it, and use it.
3. Radio button - its purpose, how to create it, and use it.
4. Button - its purpose, how to create it, and use it.
5. Label - its purpose, how to create it, and use it.
6. Combo box - its purpose, how to create it, and use it.
Explanation / Answer
1.Explain the purpose of GUI programming?
Answer:- A program interface that takes advantage of the computer's graphics capabilities to make the program easier to use. Well-designed graphical user interfaces can free the user from learning complex command languages.
The first graphical user interface was designed by Xerox Corporation's Palo Alto Research Center in the 1970s, but it was not until the 1980s and the emergence of the Apple Macintosh that graphical user interfaces became popular. One reason for their slow acceptance was the fact that they require considerable CPU power and a high-quality monitor, which until recently were prohibitively expensive.
2]Classes:-
An object-based Java application is a Java application whose design is based on declaring classes, creating objects from them, and designing interactions between those objects.
i].Panel - its purpose, how to create it, and use it.
Answer:-
Syntax for pannel is :-
public class JPanel extends JComponent implements Accessible
msglabel = new JLabel("Welcome to Java.", JLabel.CENTER);
ii].Check box - its purpose, how to create it, and use it.
Links===>http://docs.oracle.com/javase/7/docs/api/java/awt/Checkbox.html
Answer:-
iii].Radio button - its purpose, how to create it, and use it.
Answer:-
Radio buttons are groups of buttons in which, by convention, only one button at a time can be selected. The Swing release supports radio buttons with the JRadioButton and ButtonGroup classes. To put a radio button in a menu, use the JRadioButtonMenuItem class.
Links:====> https://docs.oracle.com/javase/tutorial/uiswing/components/button.html
iv].Button - its purpose, how to create it, and use it.
Answer:-
Links:====> https://docs.oracle.com/javase/tutorial/uiswing/components/button.html
v]. Label - its purpose, how to create it, and use it.
Answer:-
if you want to learn then go to this location
Links:====> https://docs.oracle.com/javase/tutorial/uiswing/components/label.html
vi].Combo box - its purpose, how to create it, and use it.
Answer:-
if you want to learn then go to this location
https://docs.oracle.com/javase/tutorial/uiswing/components/combobox.html
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.