filmov
tv
Java clock app 🕓
Показать описание
Java, clock, program, app, swing, GUI, tutorial, beginners,
#Java #clock #program #app #swing #GUI #tutorial #beginners
//---------------------------------------------------------------
public class Main {
public static void main(String[] args) {
new MyFrame();
}
}
//---------------------------------------------------------------
public class MyFrame extends JFrame{
Calendar calendar;
SimpleDateFormat timeFormat;
SimpleDateFormat dayFormat;
SimpleDateFormat dateFormat;
JLabel timeLabel;
JLabel dayLabel;
JLabel dateLabel;
String time;
String day;
String date;
MyFrame(){
timeFormat = new SimpleDateFormat("hh:mm:ss a");
dayFormat = new SimpleDateFormat("EEEE");
dateFormat = new SimpleDateFormat("MMMMM dd, yyyy");
timeLabel = new JLabel();
dayLabel = new JLabel();
dateLabel = new JLabel();
setTime();
}
public void setTime() {
while(true) {
try {
} catch (InterruptedException e) {
// TODO Auto-generated catch block
}
}
}
}
//---------------------------------------------------------------
#Java #clock #program #app #swing #GUI #tutorial #beginners
//---------------------------------------------------------------
public class Main {
public static void main(String[] args) {
new MyFrame();
}
}
//---------------------------------------------------------------
public class MyFrame extends JFrame{
Calendar calendar;
SimpleDateFormat timeFormat;
SimpleDateFormat dayFormat;
SimpleDateFormat dateFormat;
JLabel timeLabel;
JLabel dayLabel;
JLabel dateLabel;
String time;
String day;
String date;
MyFrame(){
timeFormat = new SimpleDateFormat("hh:mm:ss a");
dayFormat = new SimpleDateFormat("EEEE");
dateFormat = new SimpleDateFormat("MMMMM dd, yyyy");
timeLabel = new JLabel();
dayLabel = new JLabel();
dateLabel = new JLabel();
setTime();
}
public void setTime() {
while(true) {
try {
} catch (InterruptedException e) {
// TODO Auto-generated catch block
}
}
}
}
//---------------------------------------------------------------
Комментарии