From a28d1bf11010617cb7c656dfd24551b1abf19f1f Mon Sep 17 00:00:00 2001 From: fdai7460 Date: Thu, 9 Feb 2023 18:47:14 +0100 Subject: [PATCH] Binomische Formel GUI --- src/main/java/src/TasksFrame.java | 47 +++++++++++++++++++++++++++ src/test/java/src/TasksFrameTest.java | 1 - 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/main/java/src/TasksFrame.java b/src/main/java/src/TasksFrame.java index aaa9795..b7f3555 100644 --- a/src/main/java/src/TasksFrame.java +++ b/src/main/java/src/TasksFrame.java @@ -68,6 +68,8 @@ public class TasksFrame extends JFrame { setupDate(); + setupBinF(); + setupSteuer(); setupTemperatur(); @@ -986,6 +988,51 @@ public class TasksFrame extends JFrame { return x; } + private void setupBinF() + { + JPanel jPanel = setupPanel("Binomisches Formel"); + Character c2 = 178; + + JLabel j1 = new JLabel(); + j1.setText("(a + b)" +c2 +" = "); + j1.setVisible(true); + j1.setBounds(10,20,150,20); + + JLabel j2 = new JLabel(); + j2.setText("a:"); + j2.setVisible(true); + j2.setBounds(10,60,30,20); + + JLabel j3 = new JLabel(); + j3.setText("b:"); + j3.setVisible(true); + j3.setBounds(10,80,30,20); + + JTextField f1 = new JTextField(); + f1.setVisible(true); + f1.setBounds(45,60,30,20); + + JTextField f2 = new JTextField(); + f2.setVisible(true); + f2.setBounds(45,80,30,20); + + JButton jButton = new JButton(); + jButton.setBounds(10,100,100,30); + jButton.setText("Berechne"); + jButton.setVisible(true); + + + + jPanel.add(jButton); + jPanel.add(f1); + jPanel.add(f2); + jPanel.add(j3); + jPanel.add(j2); + jPanel.add(jButton); + jPanel.add(j1); + + } + public void setupArea() { diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index 6b73c72..481b32b 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -16,7 +16,6 @@ class TasksFrameTest { assertEquals(100,x2); } - @Test void setupPI() { TasksFrame tasksFrame = new TasksFrame();