Which of the following packages must be imported to create a JButton?

JButton

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Roma Fronda
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
java.swing.JButton
javax.swing.JButton
java.awtJButton
javax.awt.JButton
2.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which statement creates a button?
JButton box = new JButton();
JButton box = JButton();
JBox box = new JBox();
button = new JButton();
3.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following places the button 100 pixels to the right and 50 pixels down from the upper right corner of the frame?
button.setBounds(100, 50, 50, 50);
button.setBounds(50, 100, 50, 50);
button.setBounds(50, 50, 100, 50);
button.setBounds(50, 50, 50, 100);
4.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following buttons has a dimension 100 pixels wide and 50 pixels tall?
button.setBounds(50, 50, 100, 50);
button.setBounds(50, 50, 50, 100);
button.setBounds(100, 50, 50, 50);
button.setBounds(50, 100, 50, 50);
5.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which statement creates a text in the console when a button is clicked?
button.addActionListener(e -> System.out.println("text"));
button.addActionListener(e -> label.setText("text"));
button.add(e -> System.out.println("Like"));
button.add(e -> label.setText("text"));
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which statement creates a text in the label when a button is clicked?
button.addActionListener(e -> System.out.println("text"));
button.addActionListener(e -> label.setText("text"));
button.add(e -> System.out.println("Like"));
button.add(e -> label.setText("text"));
7.
FILL IN THE BLANK QUESTION
1 min • 2 pts
What statement adds a text "Click" on the button?
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
APP Design

Quiz
•
9th - 12th Grade
15 questions
MIT APP - QUIZ

Quiz
•
10th Grade
10 questions
HTML5 Forms

Quiz
•
11th - 12th Grade
12 questions
Finch Robot Review Quiz

Quiz
•
9th - 12th Grade
10 questions
Python2 віджети qt

Quiz
•
6th - 12th Grade
10 questions
PS PyQt5

Quiz
•
9th - 12th Grade
12 questions
Kosentrasi Keahlian /Pemograman Berbasis Teks,Grafis dan Multimedia

Quiz
•
11th Grade
9 questions
App Lab introduction

Quiz
•
9th Grade
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
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Identify Slope and y-intercept (from equation)

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

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
27 questions
STAAR English 1 Review

Quiz
•
9th Grade