Professional Documents
Culture Documents
import java.awt.event.WindowEvent;
import java.awt.event.WindowAdapter;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.WindowListener;
import java.text.SimpleDateFormat;
import java.awt.LayoutManager;
import java.time.ZonedDateTime;
import java.util.Date;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.event.ActionListener;
import javax.swing.Timer;
import java.util.Calendar;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JLabel;
FrameOne() {
this.lblOne = new JLabel();
this.lblTwo = new JLabel();
this.lblHr = new JLabel();
this.lblMin = new JLabel();
this.lblSec = new JLabel();
this.hrUp = new JButton();
this.hrDown = new JButton();
this.minUp = new JButton();
this.minDown = new JButton();
this.secUp = new JButton();
this.secDown = new JButton();
this.btnSet = new JButton();
this.mainFrame = new JFrame();
this.current = Calendar.getInstance();
this.pulse = new Timer(1000, new pulse_Event());
this.alarmNow = new Timer(1500, new alarm_Event());
this.setAlarm = false;
this.i = 0;
this.initialize_mainFrame();
this.initialize_lblOne();
this.initialize_lblTwo();
this.initialize_Label(this.lblHr, 275, 260, 100, 240, "00");
this.initialize_Label(this.lblMin, 275, 260, 375, 240, "00");
this.initialize_Label(this.lblSec, 275, 260, 650, 240, "00");
this.initialize_Button(this.hrUp, 275, 40, 100, 200, "+");
this.initialize_Button(this.minUp, 275, 40, 375, 200, "+");
this.initialize_Button(this.secUp, 275, 40, 650, 200, "+");
this.initialize_Button(this.hrDown, 275, 40, 100, 500, "-");
this.initialize_Button(this.minDown, 275, 40, 375, 500, "-");
this.initialize_Button(this.secDown, 275, 40, 650, 500, "-");
this.initialize_Button(this.btnSet, 350, 40, 340, 580, "SET ALARM");
this.btnSet.setFont(new Font("Arial", 1, 30));
this.pulse.start();
}