
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
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?
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Grade 6 Forms in HTML

Quiz
•
6th - 9th Grade
9 questions
Create Microsoft Forms Quiz

Quiz
•
12th Grade
10 questions
Unit 3 Quiz

Quiz
•
10th Grade - University
14 questions
Aplikasi Pengolah Angka

Quiz
•
10th Grade
12 questions
AppInventer เบื้องต้น

Quiz
•
9th - 12th Grade
15 questions
Google Docs

Quiz
•
9th Grade
11 questions
Chromebook Screen

Quiz
•
6th - 12th Grade
11 questions
The keyboard and mouse

Quiz
•
4th Grade - Professio...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade