Podcast
Questions and Answers
Model is the _________ of the MVC architecture.
Model is the _________ of the MVC architecture.
bottom most level
Which method is used to change the name of a menu item?
Which method is used to change the name of a menu item?
- String getLabel()
- setLabel(String newName) (correct)
- boolean isEnabled()
- none of the above
GetContentPane() method belongs to which class?
GetContentPane() method belongs to which class?
- JFrame
- JButton
- JApplet (correct)
- None of this
JTabbedPane class is present in which package?
JTabbedPane class is present in which package?
How many checkboxes can we check at a time?
How many checkboxes can we check at a time?
Frame is a standard window, which is ____________________ of Window class.
Frame is a standard window, which is ____________________ of Window class.
Which is/are the methods used in AbstractButton class?
Which is/are the methods used in AbstractButton class?
Which constructor creates a TextArea with 10 rows and 20 columns?
Which constructor creates a TextArea with 10 rows and 20 columns?
Which of the following is not a swing class?
Which of the following is not a swing class?
The method _______________ creates an IconImage for file c:\image\us.gif.
The method _______________ creates an IconImage for file c:\image\us.gif.
Flashcards are hidden until you start studying
Study Notes
MVC Architecture
- Model is the bottom most level of the MVC architecture.
Menu Item Modification
- Method used to change the name of a menu item:
setLabel(String newName)
.
AWT Components
- The
getContentPane()
method belongs to the JApplet class.
JTabbedPane
- JTabbedPane class is found in the javax.swing package.
Checkbox Selection
- Multiple checkboxes can be checked at the same time.
Frame Class
- Frame is a subclass of the Window class in AWT hierarchy.
AbstractButton Methods
- Methods used in AbstractButton class include:
setDisabledIcon(Icon di)
setPressedIcon(Icon pi)
setRolloverIcon(Icon ri)
- All of the above methods are valid.
TextArea Constructor
- To create a TextArea with 10 rows and 20 columns, use:
new TextArea(10, 20)
.
Swing Classes
- Canvas is not a Swing class; it's part of the AWT (Abstract Window Toolkit).
ImageIcon Creation
- The method to create an IconImage for the file
c:\image\us.gif
is:new ImageIcon("c:\\image\\us.gif")
.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.