Browse Source

Binomische Formel GUI

remotes/origin/develop
fdai7460 2 years ago
parent
commit
a28d1bf110
  1. 47
      src/main/java/src/TasksFrame.java
  2. 1
      src/test/java/src/TasksFrameTest.java

47
src/main/java/src/TasksFrame.java

@ -68,6 +68,8 @@ public class TasksFrame extends JFrame {
setupDate(); setupDate();
setupBinF();
setupSteuer(); setupSteuer();
setupTemperatur(); setupTemperatur();
@ -986,6 +988,51 @@ public class TasksFrame extends JFrame {
return x; 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() public void setupArea()
{ {

1
src/test/java/src/TasksFrameTest.java

@ -16,7 +16,6 @@ class TasksFrameTest {
assertEquals(100,x2); assertEquals(100,x2);
} }
@Test @Test
void setupPI() { void setupPI() {
TasksFrame tasksFrame = new TasksFrame(); TasksFrame tasksFrame = new TasksFrame();

Loading…
Cancel
Save