From fa17725cf411b97903cd3e6cf72e766a5aa3cee3 Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Fri, 20 Jan 2023 14:45:00 +0100 Subject: [PATCH] Setup Panel with label nr 2 --- src/main/java/src/MainFrame.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/src/MainFrame.java b/src/main/java/src/MainFrame.java index f6619af..405ff81 100644 --- a/src/main/java/src/MainFrame.java +++ b/src/main/java/src/MainFrame.java @@ -5,8 +5,6 @@ import javax.swing.border.LineBorder; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; public class MainFrame extends JFrame { @@ -41,9 +39,12 @@ public class MainFrame extends JFrame { boxPanel.setLayout(new BoxLayout(boxPanel, BoxLayout.X_AXIS)); rootPanel.add(boxPanel); - JPanel jPanel1 = setupJPannel2("1"); + JPanel jPanel1 = setupNums("1"); boxPanel.add(jPanel1); + JPanel jPanel2 = setupNums("2"); + boxPanel.add(jPanel2); + JButton back = new JButton(); back.setVisible(true); back.setBounds(5, 5, 100, 25); @@ -70,7 +71,7 @@ public class MainFrame extends JFrame { } - private JPanel setupJPannel2(String number) { + private JPanel setupNums(String number) { JPanel jPanel = new JPanel(); jPanel.setBackground(Color.BLUE); jPanel.setVisible(true);