Test Your Knowledge on Watch Your Step

Quiz yourself to assess the knowledge you gained in the chapter.

1

How do you set the size of a JButton object?

A)

You cannot set the size of a button, it will always be the right size for its text.

B)

Use JButton's setSize() method.

C)

Use JButton's setPreferredSize() method.

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.