JButton

JButton

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Grafičko sučelje - Tkinter

Grafičko sučelje - Tkinter

7th - 9th Grade

10 Qs

Practice for Quiz #12

Practice for Quiz #12

9th - 12th Grade

15 Qs

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

PRUEBA CORTA I - SISTEMA E INSTALACIÓN DE SOFTWARE I - U4

9th - 12th Grade

15 Qs

Thunkable Intro!

Thunkable Intro!

9th - 12th Grade

13 Qs

Уроки Java Forms для 10 класса

Уроки Java Forms для 10 класса

10th Grade

12 Qs

MINECRAFT

MINECRAFT

9th Grade

10 Qs

Computer Quiz

Computer Quiz

7th Grade - University

15 Qs

Scratch: Events, Loops and The Coordinate System

Scratch: Events, Loops and The Coordinate System

2nd Grade - Professional Development

15 Qs

JButton

JButton

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?