Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review_6 AWT, Swing, ActionListener, and Graphics.

Similar presentations


Presentation on theme: "Review_6 AWT, Swing, ActionListener, and Graphics."— Presentation transcript:

1 Review_6 AWT, Swing, ActionListener, and Graphics

2 What is javax.swing?

3 If we make a JFrame, what code do we need to make it show up?

4 How do we put a JPanel into a JFrame?

5 If we do not specify a JFrame to do EXIT_ON_CLOSE, what happens?

6 What are JButton and JCheckbox?

7 How do we set the color to red in the paintComponent method?

8 If we set a JLabel to have a background color, what else do we need to do to see the color?

9 How do we change this label to write something else? JLabel display = new Jlabel();

10 In Java, layouts are handled by objects called…

11 Which layout is the best for quick GUI design and automatically reacts to resizing?

12 Which layout is the best for grouping and placing components at the center or sides of your frame?

13 Which layout is the best for placing all of your components manually?

14 Which layout is the best for automatically placing components into rows and columns?

15 What is it called when we put panels with layouts inside panels with layouts?

16 What is ActionListener?

17 What method does the ActionListener interface have?

18 Fill in the blank to use actionlisteners: public class MyListener ________ ActionListener

19 What import do we need to use ActionListeners?

20 In the following code, what is goes in the blank? button.addActionListener(____);

21 What goes in the blank? public void actionPerformed(___) {

22 What code do we use to figure out which button was clicked?

23 To paint inside of a JPanel, we first need to make a class that extends Jpanel and overrides the....

24 What keyword can we use to refer to the parent class?

25 If we want our graphics to resize with the frame, what methods do we need?

26 If we want to draw the outline of a circle, what method should we use?

27 If we want to draw a filled in rectangle what method should we use?

28 The drawPolygon method takes in what three parameters?


Download ppt "Review_6 AWT, Swing, ActionListener, and Graphics."

Similar presentations


Ads by Google