diff --git a/src/main/java/src/MainFrame.java b/src/main/java/src/MainFrame.java index 3865459..f6619af 100644 --- a/src/main/java/src/MainFrame.java +++ b/src/main/java/src/MainFrame.java @@ -36,13 +36,14 @@ public class MainFrame extends JFrame { int j = 0; - double d = 1.0; - String str = "Hallo"; JPanel boxPanel = setupJPanel(); boxPanel.setLayout(new BoxLayout(boxPanel, BoxLayout.X_AXIS)); rootPanel.add(boxPanel); + JPanel jPanel1 = setupJPannel2("1"); + boxPanel.add(jPanel1); + JButton back = new JButton(); back.setVisible(true); back.setBounds(5, 5, 100, 25); @@ -69,6 +70,20 @@ public class MainFrame extends JFrame { } + private JPanel setupJPannel2(String number) { + JPanel jPanel = new JPanel(); + jPanel.setBackground(Color.BLUE); + jPanel.setVisible(true); + jPanel.setBorder(new LineBorder(Color.PINK, 1)); + + JLabel numLabel1 = new JLabel(); + numLabel1.setText(number); + numLabel1.setLayout(null); + numLabel1.setVisible(true); + jPanel.add(numLabel1); + + return jPanel; + } public JPanel setupJPanel() {