
JButton
Authored by Roma Fronda
Computers
9th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
Which of the following packages must be imported to create a JButton?
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?
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Word basics
Quiz
•
8th - 12th Grade
10 questions
Administrasi Sistem Jaringan
Quiz
•
12th Grade
12 questions
HTML
Quiz
•
9th - 12th Grade
15 questions
Edición de Videos
Quiz
•
7th - 9th Grade
10 questions
Grade 11 Term 4 Practice 2
Quiz
•
11th Grade
15 questions
Digital Etiquette
Quiz
•
4th Grade - University
10 questions
Keyboarding Terms
Quiz
•
9th - 12th Grade
15 questions
LATSOL PASCA STS
Quiz
•
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade