challenge code

This commit is contained in:
Josh Ashton
2023-11-15 10:50:01 -07:00
parent 2feee0f8e8
commit 1d457612ec
2 changed files with 2 additions and 47 deletions
+1 -19
View File
@@ -15,24 +15,6 @@ public class Panel extends JPanel {
}
private void init() {
setBackground(bg);
setForeground(fg);
Button b = new Button("Example text", new Color(160, 32, 240), Color.WHITE);
b.addActionListener(
e -> {
System.out.println("Button action.");
}
);
Button b2 = new Button("Example 2 text", new Color(160, 32, 240), Color.WHITE);
b2.addActionListener(
e -> {
System.out.println("Button 2 action.");
}
);
add(b);
add(b2);
// TODO: Add 2 buttons to the Panel object, and set the background and foreground colors.
}
}