mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added new improvements
This commit is contained in:
parent
960fdaa593
commit
c260044cb4
@ -11,6 +11,12 @@ import java.awt.HeadlessException;
|
|||||||
public class TimeCalcWindow extends JFrame {
|
public class TimeCalcWindow extends JFrame {
|
||||||
public TimeCalcWindow() throws HeadlessException {
|
public TimeCalcWindow() throws HeadlessException {
|
||||||
setFocusable(true);
|
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) {
|
public Component[] addAll(Component... comp) {
|
||||||
|
@ -135,7 +135,7 @@ public class TimeCalcManager {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
JTextPane text = new JTextPane();
|
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.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12));
|
||||||
text.setForeground(Color.GRAY);
|
text.setForeground(Color.GRAY);
|
||||||
text.setBackground(new Color(238, 238, 238));
|
text.setBackground(new Color(238, 238, 238));
|
||||||
@ -192,12 +192,6 @@ public class TimeCalcManager {
|
|||||||
window.setTitle(windowTitle);
|
window.setTitle(windowTitle);
|
||||||
window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
|
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
|
weatherButton
|
||||||
.addActionListener(e -> new WeatherWindow().setVisible(true));
|
.addActionListener(e -> new WeatherWindow().setVisible(true));
|
||||||
commandButton
|
commandButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user