|
@ -1,6 +1,7 @@ |
|
|
package src; |
|
|
package src; |
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
import javax.swing.*; |
|
|
|
|
|
import javax.swing.border.Border; |
|
|
import javax.swing.border.EmptyBorder; |
|
|
import javax.swing.border.EmptyBorder; |
|
|
import java.awt.*; |
|
|
import java.awt.*; |
|
|
import java.awt.event.ActionEvent; |
|
|
import java.awt.event.ActionEvent; |
|
@ -66,6 +67,8 @@ public class TasksFrame extends JFrame { |
|
|
|
|
|
|
|
|
setupHelloWorld(); |
|
|
setupHelloWorld(); |
|
|
|
|
|
|
|
|
|
|
|
setupDate(); |
|
|
|
|
|
|
|
|
setupSum(); |
|
|
setupSum(); |
|
|
|
|
|
|
|
|
setupDiff(); |
|
|
setupDiff(); |
|
@ -91,6 +94,25 @@ public class TasksFrame extends JFrame { |
|
|
setupBmi(); |
|
|
setupBmi(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setupDate() { |
|
|
|
|
|
|
|
|
|
|
|
JPanel jPanel = setupPanel("Datum"); |
|
|
|
|
|
|
|
|
|
|
|
String dateStr = String.format("%ta, %1$te. %1$tb %1$tY - %1$tT", System.currentTimeMillis()); |
|
|
|
|
|
JLabel label = new JLabel(dateStr); |
|
|
|
|
|
label.setVisible(true); |
|
|
|
|
|
label.setBounds(10, 45, 160, 50); |
|
|
|
|
|
Border border = BorderFactory.createLineBorder(Color.BLUE, 3); |
|
|
|
|
|
label.setBorder(border); |
|
|
|
|
|
label.setForeground(Color.BLACK); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jPanel.add(label); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void setupBmi() { |
|
|
private void setupBmi() { |
|
|