From ea040453fe1d7ab1812541cbf648e1d90e63c11b Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Tue, 10 Jan 2023 17:20:11 +0100 Subject: [PATCH 1/3] DTSUD-49 builded retry Button --- sudokuExample/src/Main.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sudokuExample/src/Main.java b/sudokuExample/src/Main.java index e02ffa2..07fdd00 100644 --- a/sudokuExample/src/Main.java +++ b/sudokuExample/src/Main.java @@ -26,7 +26,7 @@ public class Main { JFrame main = new JFrame(); main.setLayout(null); main.setVisible(true); - main.setBounds(300, 200, 500, 500); + main.setBounds(300, 200, 500, 600); main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel rootPanel = new JPanel(); @@ -53,6 +53,12 @@ public class Main { newButton.setText("New"); rootPanel.add(newButton); + JButton retryButton = new JButton(); + retryButton.setVisible(true); + retryButton.setText("Retry"); + retryButton.setBounds(5, 525, 100, 25); + rootPanel.add(retryButton); + } }); } From 3d6ee97eb12c311f74e2ed2b564d5e76c0bd9346 Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Tue, 10 Jan 2023 17:24:18 +0100 Subject: [PATCH 2/3] DTSUD-50 builded Correct Button --- sudokuExample/src/Main.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sudokuExample/src/Main.java b/sudokuExample/src/Main.java index 07fdd00..2511b3d 100644 --- a/sudokuExample/src/Main.java +++ b/sudokuExample/src/Main.java @@ -59,6 +59,12 @@ public class Main { retryButton.setBounds(5, 525, 100, 25); rootPanel.add(retryButton); + JButton correctButton = new JButton(); + correctButton.setVisible(true); + correctButton.setText("Correct"); + correctButton.setBounds(395, 525, 100, 25); + rootPanel.add(correctButton); + } }); } From bb2304a3af5c8e3497410d2499254e26a178def1 Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Tue, 10 Jan 2023 19:21:52 +0100 Subject: [PATCH 3/3] DTSUD-48 Eingabe Felder von 1 bis 9 incl. ein leeres feld --- sudokuExample/src/Main.java | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sudokuExample/src/Main.java b/sudokuExample/src/Main.java index 2511b3d..8f7663f 100644 --- a/sudokuExample/src/Main.java +++ b/sudokuExample/src/Main.java @@ -3,6 +3,7 @@ import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.lang.String; public class Main { @@ -41,6 +42,40 @@ public class Main { main.setContentPane(rootPanel); + JPanel numberPanel = new JPanel(); + numberPanel.setVisible(true); + numberPanel.setBounds(100, 450, 300, 30); + rootPanel.add(numberPanel); + + for (int i = 1, j=0; i < 10; i++) { + JLabel numberi= new JLabel(); + numberi.setText(""+i); + numberi.setBounds(5+j, 5, 20, 20); + numberPanel.setLayout(null); + + JPanel ni = new JPanel(); + ni.setBounds(5+j, 5, 20, 20); + ni.setVisible(true); + ni.setBackground(Color.pink); + ni.add(numberi); + numberPanel.add(ni); + j=j+25; + } + + JLabel number10= new JLabel(); + number10.setText(" "); + number10.setBounds(250, 5, 20, 20); + numberPanel.setLayout(null); + + JPanel n10 = new JPanel(); + n10.setBounds(250, 5, 20, 20); + n10.setVisible(true); + n10.setBackground(Color.pink); + n10.add(number10); + numberPanel.add(n10); + + + JButton back = new JButton(); back.setVisible(true); back.setBounds(5, 5, 100, 25);