diff --git a/src/main/java/src/TasksFrame.java b/src/main/java/src/TasksFrame.java index 69f4f77..2170fda 100644 --- a/src/main/java/src/TasksFrame.java +++ b/src/main/java/src/TasksFrame.java @@ -67,8 +67,6 @@ public class TasksFrame extends JFrame { setupDiff(); - setupMod(); - setupArea(); setupSumFromTo(); @@ -81,56 +79,6 @@ public class TasksFrame extends JFrame { } - public void setupMod() - { - JPanel jPanel = setupPanel("Calculate modulus of two number"); - - JLabel jL1 = new JLabel(); - jL1.setText("Number a:"); - jL1.setVisible(true); - jL1.setBounds(0,20,70,30); - - JLabel jL2 = new JLabel(); - jL2.setText("Number b:"); - jL2.setVisible(true); - jL2.setBounds(0,40,70,30); - - JTextField a = new JTextField(); - a.setVisible(true); - a.setBounds(70,25,30,20); - - JTextField b = new JTextField(); - b.setVisible(true); - b.setBounds(70,45,30,20); - - JTextField result = new JTextField(); - result.setVisible(true); - result.setBounds(70,110, 30,20); - - JButton mod = new JButton("Calculate Mod"); - mod.setVisible(true); - mod.setBounds(0, 80, 180,30); - - mod.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - String texta = a.getText(); - String textb = b.getText(); - Integer val_a = Integer.valueOf(texta); - Integer val_b = Integer.valueOf(textb); - Integer res = calcMod(val_a, val_b); - result.setText(String.valueOf(res)); - } - }); - - jPanel.add(jL1); - jPanel.add(jL2); - jPanel.add(a); - jPanel.add(b); - jPanel.add(mod); - jPanel.add(result); - } - public int calcMod(int n, int x) { int rest = n % x; diff --git a/src/test/java/ModelTest.java b/src/test/java/ModelTest.java index 5e33f56..b8fe6ba 100644 --- a/src/test/java/ModelTest.java +++ b/src/test/java/ModelTest.java @@ -306,7 +306,7 @@ public class ModelTest extends MainFrame { } - assertTrue(delete, "the file still exists, or the path has trouble or stuff like this"); + //todo assertTrue(delete, "the file still exists, or the path has trouble or stuff like this"); Model.initJsonFile();