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?

Quiz 2 Java GUI

Quiz
•
Computers
•
University
•
Medium

Angeline pang
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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 )
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Chapter 5 Java swing , small Apps

Quiz
•
University
10 questions
T_4.2 Identifier, Data Types, Operators & Expressions

Quiz
•
12th Grade - University
7 questions
Java Programming Game

Quiz
•
University
15 questions
Pre Test Praktikum Pember 4D

Quiz
•
University
15 questions
Mobile Application Development Quiz1

Quiz
•
University
15 questions
HTML CSS Basics Assessment -1

Quiz
•
University
11 questions
Básicos de programación en Android

Quiz
•
University
10 questions
Chapter 1GUI Components

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade