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
OOPJ- Data Types-Java

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

Quiz
•
12th Grade - University
10 questions
G12_Week7

Quiz
•
12th Grade - University
15 questions
Code Craft : Java & Web Quiz"

Quiz
•
University
7 questions
Java Programming Game

Quiz
•
University
15 questions
Pre Test Praktikum Pember 4D

Quiz
•
University
15 questions
Post-Test Microsoft Word (G2)

Quiz
•
University
10 questions
GUI Quiz

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade