Added new improvements

This commit is contained in:
Robert Vokac 2024-02-03 03:07:37 +00:00
parent 960fdaa593
commit c260044cb4
No known key found for this signature in database
GPG Key ID: 693D30BEE3329055
2 changed files with 7 additions and 7 deletions

View File

@ -11,6 +11,12 @@ import java.awt.HeadlessException;
public class TimeCalcWindow extends JFrame {
public TimeCalcWindow() throws HeadlessException {
setFocusable(true);
addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
}
public Component[] addAll(Component... comp) {

View File

@ -135,7 +135,7 @@ public class TimeCalcManager {
}
});
JTextPane text = new JTextPane();
text.setBounds(10, 10 + 210 + 10, 500, 250);
text.setBounds(MARGIN, MARGIN + 210 + MARGIN, 500, 250);
text.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
text.setForeground(Color.GRAY);
text.setBackground(new Color(238, 238, 238));
@ -192,12 +192,6 @@ public class TimeCalcManager {
window.setTitle(windowTitle);
window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
window.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
weatherButton
.addActionListener(e -> new WeatherWindow().setVisible(true));
commandButton