Search Header Logo

Quiz 2 Java GUI

Authored by Angeline pang

Computers

University

10 Questions

Used 3+ times

Quiz 2 Java GUI
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose that you create an application in which you instantiate a JFrame named frame1 and a JLabel named label1. Which of the following statements within the application adds label1 to frame1?

label1.add(frame1);

frame1.add(label1);

this.add(label1);

two of the above

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The package used for using graphical classes is

awt

util

lang

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The basic container for java graphical programs is

Panel

Button

Frame

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you change the text of a label to the text contained by an integer named num;

label.setText(num);

label.updateText(num);

label.setTest("num");

label.setText(num+ "");

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What object type handles Java's layouts?

Layout Manager

Layout Scheduler

Layout Operator

Layout Director

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of one of the following package does not contain GUI components?

java.applet

java.awt

javax.swing

java.io

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is a GUI component (such as a button) placed into a JFrame?

insert( Component c )

add( Component c)

draw( Component c )

put( Component c )

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?