|
@ -97,14 +97,17 @@ public class TasksFrame extends JFrame { |
|
|
JTextField a = new JTextField(); |
|
|
JTextField a = new JTextField(); |
|
|
a.setBounds(10, 40, 30, 20); |
|
|
a.setBounds(10, 40, 30, 20); |
|
|
a.setVisible(true); |
|
|
a.setVisible(true); |
|
|
|
|
|
a.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JTextField b = new JTextField(); |
|
|
JTextField b = new JTextField(); |
|
|
b.setBounds(50, 40, 30, 20); |
|
|
b.setBounds(50, 40, 30, 20); |
|
|
b.setVisible(true); |
|
|
b.setVisible(true); |
|
|
|
|
|
b.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JTextField c = new JTextField(); |
|
|
JTextField c = new JTextField(); |
|
|
c.setBounds(90, 40, 30, 20); |
|
|
c.setBounds(90, 40, 30, 20); |
|
|
c.setVisible(true); |
|
|
c.setVisible(true); |
|
|
|
|
|
c.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel jLabel = new JLabel(); |
|
|
JLabel jLabel = new JLabel(); |
|
|
jLabel.setVisible(true); |
|
|
jLabel.setVisible(true); |
|
@ -159,10 +162,12 @@ public class TasksFrame extends JFrame { |
|
|
JTextField a = new JTextField(); |
|
|
JTextField a = new JTextField(); |
|
|
a.setBounds(10, 40, 30, 20); |
|
|
a.setBounds(10, 40, 30, 20); |
|
|
a.setVisible(true); |
|
|
a.setVisible(true); |
|
|
|
|
|
a.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JTextField b = new JTextField(); |
|
|
JTextField b = new JTextField(); |
|
|
b.setBounds(50, 40, 30, 20); |
|
|
b.setBounds(50, 40, 30, 20); |
|
|
b.setVisible(true); |
|
|
b.setVisible(true); |
|
|
|
|
|
b.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel jLabel = new JLabel(); |
|
|
JLabel jLabel = new JLabel(); |
|
|
jLabel.setVisible(true); |
|
|
jLabel.setVisible(true); |
|
@ -183,6 +188,8 @@ public class TasksFrame extends JFrame { |
|
|
int res = kgV(val_a, val_b); |
|
|
int res = kgV(val_a, val_b); |
|
|
jLabel.setText(String.valueOf(res)); |
|
|
jLabel.setText(String.valueOf(res)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -206,6 +213,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField jTextField = new JTextField(); |
|
|
JTextField jTextField = new JTextField(); |
|
|
jTextField.setVisible(true); |
|
|
jTextField.setVisible(true); |
|
|
jTextField.setBounds(10, 40, 30, 20); |
|
|
jTextField.setBounds(10, 40, 30, 20); |
|
|
|
|
|
jTextField.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel jLabel = new JLabel(); |
|
|
JLabel jLabel = new JLabel(); |
|
|
jLabel.setVisible(true); |
|
|
jLabel.setVisible(true); |
|
@ -253,6 +261,9 @@ public class TasksFrame extends JFrame { |
|
|
JTextField jTextField = new JTextField(); |
|
|
JTextField jTextField = new JTextField(); |
|
|
jTextField.setVisible(true); |
|
|
jTextField.setVisible(true); |
|
|
jTextField.setBounds( 10, 40, 30, 20); |
|
|
jTextField.setBounds( 10, 40, 30, 20); |
|
|
|
|
|
jTextField.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JLabel jLabel = new JLabel(); |
|
|
JLabel jLabel = new JLabel(); |
|
|
jLabel.setVisible(true); |
|
|
jLabel.setVisible(true); |
|
@ -334,6 +345,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField a = new JTextField(); |
|
|
JTextField a = new JTextField(); |
|
|
a.setBounds(10, 50, 30, 20); |
|
|
a.setBounds(10, 50, 30, 20); |
|
|
a.setVisible(true); |
|
|
a.setVisible(true); |
|
|
|
|
|
a.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel sum = new JLabel(); |
|
|
JLabel sum = new JLabel(); |
|
|
sum.setBounds(40, 50, 10, 20); |
|
|
sum.setBounds(40, 50, 10, 20); |
|
@ -343,6 +355,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField b = new JTextField(); |
|
|
JTextField b = new JTextField(); |
|
|
b.setBounds(50, 50, 30, 20); |
|
|
b.setBounds(50, 50, 30, 20); |
|
|
b.setVisible(true); |
|
|
b.setVisible(true); |
|
|
|
|
|
b.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel equal = new JLabel(); |
|
|
JLabel equal = new JLabel(); |
|
|
equal.setBounds(90, 50, 30, 20); |
|
|
equal.setBounds(90, 50, 30, 20); |
|
@ -352,6 +365,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField result = new JTextField(); |
|
|
JTextField result = new JTextField(); |
|
|
result.setBounds(100, 50, 40, 20); |
|
|
result.setBounds(100, 50, 40, 20); |
|
|
result.setVisible(true); |
|
|
result.setVisible(true); |
|
|
|
|
|
result.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JButton add = new JButton("add"); |
|
|
JButton add = new JButton("add"); |
|
|
add.setBounds(10, 90, 100, 30); |
|
|
add.setBounds(10, 90, 100, 30); |
|
@ -391,6 +405,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField x = new JTextField(); |
|
|
JTextField x = new JTextField(); |
|
|
x.setBounds(10,50,30,20); |
|
|
x.setBounds(10,50,30,20); |
|
|
x.setVisible(true); |
|
|
x.setVisible(true); |
|
|
|
|
|
x.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel diff = new JLabel(); |
|
|
JLabel diff = new JLabel(); |
|
|
diff.setBounds(40, 50, 10, 20); |
|
|
diff.setBounds(40, 50, 10, 20); |
|
@ -400,6 +415,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField y = new JTextField(); |
|
|
JTextField y = new JTextField(); |
|
|
y.setBounds(50,50,30,20); |
|
|
y.setBounds(50,50,30,20); |
|
|
y.setVisible(true); |
|
|
y.setVisible(true); |
|
|
|
|
|
y.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JLabel equal = new JLabel(); |
|
|
JLabel equal = new JLabel(); |
|
|
equal.setBounds(90, 50, 30, 20); |
|
|
equal.setBounds(90, 50, 30, 20); |
|
@ -409,6 +425,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField result = new JTextField(); |
|
|
JTextField result = new JTextField(); |
|
|
result.setBounds(100,50,40,20); |
|
|
result.setBounds(100,50,40,20); |
|
|
result.setVisible(true); |
|
|
result.setVisible(true); |
|
|
|
|
|
result.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JButton difference = new JButton("Difference"); |
|
|
JButton difference = new JButton("Difference"); |
|
|
difference.setBounds(10,90,100,30); |
|
|
difference.setBounds(10,90,100,30); |
|
@ -458,10 +475,12 @@ public class TasksFrame extends JFrame { |
|
|
JTextField a = new JTextField(); |
|
|
JTextField a = new JTextField(); |
|
|
a.setVisible(true); |
|
|
a.setVisible(true); |
|
|
a.setBounds(50,25,30,20); |
|
|
a.setBounds(50,25,30,20); |
|
|
|
|
|
a.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JTextField b = new JTextField(); |
|
|
JTextField b = new JTextField(); |
|
|
b.setVisible(true); |
|
|
b.setVisible(true); |
|
|
b.setBounds(50,45,30,20); |
|
|
b.setBounds(50,45,30,20); |
|
|
|
|
|
b.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JButton area = new JButton("Calculate area"); |
|
|
JButton area = new JButton("Calculate area"); |
|
|
area.setVisible(true); |
|
|
area.setVisible(true); |
|
@ -472,6 +491,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField areaRes = new JTextField(); |
|
|
JTextField areaRes = new JTextField(); |
|
|
areaRes.setBounds(200,80,30,20 ); |
|
|
areaRes.setBounds(200,80,30,20 ); |
|
|
areaRes.setVisible(true); |
|
|
areaRes.setVisible(true); |
|
|
|
|
|
areaRes.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
area.addActionListener(new ActionListener() { |
|
|
area.addActionListener(new ActionListener() { |
|
|
@Override |
|
|
@Override |
|
@ -501,6 +521,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField perimeterRes = new JTextField(); |
|
|
JTextField perimeterRes = new JTextField(); |
|
|
perimeterRes.setBounds(200,110,30,20 ); |
|
|
perimeterRes.setBounds(200,110,30,20 ); |
|
|
perimeterRes.setVisible(true); |
|
|
perimeterRes.setVisible(true); |
|
|
|
|
|
perimeterRes.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
perimeter.addActionListener(new ActionListener() { |
|
|
perimeter.addActionListener(new ActionListener() { |
|
|
@Override |
|
|
@Override |
|
|
public void actionPerformed(ActionEvent e) { |
|
|
public void actionPerformed(ActionEvent e) { |
|
@ -539,14 +560,17 @@ public class TasksFrame extends JFrame { |
|
|
JTextField a = new JTextField(); |
|
|
JTextField a = new JTextField(); |
|
|
a.setBounds(10, 50, 30, 20); |
|
|
a.setBounds(10, 50, 30, 20); |
|
|
a.setVisible(true); |
|
|
a.setVisible(true); |
|
|
|
|
|
a.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JTextField b = new JTextField(); |
|
|
JTextField b = new JTextField(); |
|
|
b.setBounds(50, 50, 30, 20); |
|
|
b.setBounds(50, 50, 30, 20); |
|
|
b.setVisible(true); |
|
|
b.setVisible(true); |
|
|
|
|
|
b.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JTextField result = new JTextField(); |
|
|
JTextField result = new JTextField(); |
|
|
result.setBounds(100, 50, 40, 20); |
|
|
result.setBounds(100, 50, 40, 20); |
|
|
result.setVisible(true); |
|
|
result.setVisible(true); |
|
|
|
|
|
result.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
JButton sumFromTo = new JButton("calculate"); |
|
|
JButton sumFromTo = new JButton("calculate"); |
|
|
sumFromTo.setBounds(10,90,100,30); |
|
|
sumFromTo.setBounds(10,90,100,30); |
|
@ -591,6 +615,7 @@ public class TasksFrame extends JFrame { |
|
|
JTextField jTextField = new JTextField(); |
|
|
JTextField jTextField = new JTextField(); |
|
|
jTextField.setVisible(true); |
|
|
jTextField.setVisible(true); |
|
|
jTextField.setBounds(3, 40, 250, 30); |
|
|
jTextField.setBounds(3, 40, 250, 30); |
|
|
|
|
|
jTextField.setFont(new java.awt.Font("Arial", Font.ROMAN_BASELINE | Font.BOLD, 12)); |
|
|
|
|
|
|
|
|
for (int i = from; i < to; i++) { |
|
|
for (int i = from; i < to; i++) { |
|
|
int e = i % 5; |
|
|
int e = i % 5; |
|
|