Create Software Components 

Using Java Level 2

 

 

Course Info

Scheme

Resources

Tutorials

Java Demos

Utilities

Links


 

    Quiz 8

Containers

There are 12 questions

Question 1.         

What is JFC short for? 

_________________________________

Question 2.         

What is AWT short for? 

_________________________________

Question 3.         

The Swing package must be imported before you can use Swing classes.  Which of the following is the correct line of code for importing the Swing package?

(a)   import java.swing;

(b)   import java.swing.*;

(c)   import javax.swing.*;

(d)   import javax.swing;  

Question 4.         

A panel is 

(a)   a text area

(b)   an area for drawing shapes

(c)   a container for placing components

(d)   a container for images 

Question 5.         

A frame is 

(a)   a pure container which never can have a border or a title.

(b)   an area for drawing shapes only

(c)   a modal dialog

(d)   a window that may have a border, a title, and buttons for closing and iconifying the window.

Question 6.         

Examine the picture of the menu below.

The New component of the menu is an example of a...

(a)   JMenuBar

(b)   JMenuItem

(c)   JMenu

(d)   Menu  

Question 7.         

Which of the following is correct for adding a swing button referenced by the variable myButton to a swing panel referenced by the variable myPanel?

(a)   myPanel.add(myButton);

(b)   myPanel.add.myButton;

(c)   myPanel.add(myJButton);

(d)   myJPanel.add(myButton); 

Question 8.         

Which of the following is correct for creating an instance of a Swing frame with the title "Hello World!"? 

(a)   JFrame frame = new JFrame("Hello World!");

(b)   Frame frame = new Frame("Hello World!");

(c)   JFrame JFrame("Hello World!");

(d)   Frame JFrame("Hello World!");

Question 9.         

The three main top-level Swing containers are the JTextArea, JDialog and JApplet 

(a)   true

(b)   false

Question 10.         

The JOptionPane class is used for creating standard dialog boxes.

(a)   true

(b)   false  

Question 11.         

A  non-modal dialog allows other windows to be accessed while it is displayed 

(a)   true

(b)   false  

Question 12.         

A  modal dialog allows other windows to be accessed while it is displayed 

(a)   true

(b)   false  

 

        

 

  Site Home 

Java Home   

  Forum  

Course Info

Welcome

Overview

Assessment

Qualification

Scheme of Work

Assignments

Resources

Information

Blackboard

Learning Center

Web Materials

Reading

Java Demos

Utilities

Links

Lecture Materials

Tutorials & Notes

Exercises

Activities

Quizzes

 

Site Home

Top

Unit Home

ADR 2002