tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code16:30

Java clock app 🕓

Bro Code ↗

From the creator

Java, clock, program, app, swing, GUI, tutorial, beginners, #Java #clock #program #app #swing #GUI #tutorial #beginners //https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html#text //--------------------------------------------------------------- public class Main { public static void main(String[] args) { new MyFrame(); } } //--------------------------------------------------------------- import java.awt.*; import java.text.*; import java.util.*; import javax.swing.*; 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(){ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setTitle("My Clock Program"); this.setLayout(new FlowLayout()); this.setSize(350,200); this.setResizable(false); timeFormat = new SimpleDateFormat("hh:mm:ss a"); dayFormat = new SimpleDateFormat("EEEE"); dateFormat = new SimpleDateFormat("MMMMM dd, yyyy"); timeLabel = new JLabel(); timeLabel.setFont(new Font("Verdana",Font.PLAIN,50)); timeLabel.setForeground(new Color(0x00FF00)); timeLabel.setBackground(Color.black); timeLabel.setOpaque(true); dayLabel = new JLabel(); dayLabel.setFont(new Font("Ink Free",Font.PLAIN,35)); dateLabel = new JLabel(); dateLabel.setFont(new Font("Ink Free",Font.PLAIN,25)); this.add(timeLabe

Published 2020-09-06 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code