|
|
@ -1,6 +1,7 @@ |
|
|
|
package src; |
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.border.Border; |
|
|
|
import javax.swing.border.EmptyBorder; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
@ -66,6 +67,8 @@ public class TasksFrame extends JFrame { |
|
|
|
|
|
|
|
setupHelloWorld(); |
|
|
|
|
|
|
|
setupDate(); |
|
|
|
|
|
|
|
setupSum(); |
|
|
|
|
|
|
|
setupDiff(); |
|
|
@ -91,6 +94,25 @@ public class TasksFrame extends JFrame { |
|
|
|
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() { |
|
|
|