Java Clockframe

Questions/Tutorials for any programming language not covered in other sections.
1 post Page 1 of 1
Contributors
User avatar
DeveloperJacob
VIP - Donator
VIP - Donator
Posts: 87
Joined: Sun May 27, 2012 12:40 pm

Java Clockframe
DeveloperJacob
Hello,

A few months ago I bought a book for learning Java. That book was realy usefull for me and I learned very much things about java. And now I'v wrote a simple script for a Java Clockframe:
Code: Select all
import java.awt.*;
import javax.swing.*;

public class ClockFrame extends JFrame {
        public ClockFrame() {
                super("Clock");
                setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                Container pane = getContentPane();
                FlowLayout(flo);
                ClockPanel time =  new ClockPanel();
                pane.add(time);
                setContentPane(time);
                setVisible(true);
        }

        public static void main(String[] arguments) {
                ClockFrame sal = new ClockFrame();
        }
}
Note: This is not a working clock but only the frame.

Sorry for the misspelled words in this post because I wrote this post on my droid :D
Image
1 post Page 1 of 1
Return to “Misc”