Exam 7: A First Look at Gui Applications
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
Why doesn't the following code compile correctly? import java.awt.*;
Import java.awt.event.*;
Import javax.swing.*;
Public class ColorCheckBoxWindow extends JFrame
{
Private JCheckBox greenCheckBox;
Private final int WINDOW_WIDTH = 300,WINDOW_HEIGHT = 100;
Public ColorCheckBoxWindow()
{
SetTitle("Green Check Box");
SetSize(WINDOW_WIDTH,WINDOW_HEIGHT);
SetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GreenCheckBox = new JCheckBox("Green");
GreenCheckBox.addItemListener(new CheckBoxListener());
SetLayout(new FlowLayout());
Add(greenCheckBox);
SetVisible(true);
}
Public void itemStateChanged(ItemEvent e)
{
If (e.getSource()== greenCheckBox)
{
System.exit(0);
}
}
}
(Multiple Choice)
4.8/5
(39)
To include Swing and AWT components in your program,use the following import statements
(Multiple Choice)
4.8/5
(35)
Assume that radio references a JRadioButton object.To click the radio button in code,use the following statement.
(Multiple Choice)
4.8/5
(39)
When a component is added to a region in the BorderLayout manager,
(Multiple Choice)
4.9/5
(27)
In Java,the ability to display splash screens was introduced in Java 6.
(True/False)
4.8/5
(32)
What will be the result of executing the following statement? panel.setBorder(BorderFactory.createLineBorder(Color.BLUE,5));
(Multiple Choice)
4.8/5
(28)
The following statement adds the FlowLayout manager to the container,centers the components,and separates the components with a gap of 10 pixels.
setLayout(new FlowLayout());
(True/False)
4.8/5
(40)
To use the Color class,which is used to set the foreground and background of various objects,use the following import statement
(Multiple Choice)
4.8/5
(37)
This is a graphic image that is displayed while an application loads into memory and starts up.
(Multiple Choice)
4.9/5
(33)
Which of the following statements creates a class that is extended from the JFrame class?
(Multiple Choice)
4.8/5
(34)
When an application uses many components,rather than deriving just one class from the JFrame class,it is often better to encapsulate smaller groups of related components and their event listeners into their own class.A commonly used technique to do this is:
(Multiple Choice)
4.8/5
(43)
To end an application,pass this as the argument to the JFrame class's setDefaultCloseOperation()method.
(Multiple Choice)
4.8/5
(31)
Which of the following is not a rule for the FlowLayout manager?
(Multiple Choice)
4.9/5
(39)
Check boxes may be grouped in a ButtonGroup like radio buttons are.
(True/False)
4.8/5
(32)
When an application uses many components,instead of extending just one class from the JFrame class,a better approach is to
(Multiple Choice)
5.0/5
(44)
The GridLayout manager limits each cell to only one component.To put two or more components in a cell,do this.
(Multiple Choice)
4.9/5
(43)
When you write an action listener class for a JButton component,it must
(Multiple Choice)
4.9/5
(46)
Showing 21 - 40 of 49
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)