Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

this is wha i'm working on: any help???

Thread view: 
llloyd wood - 05 Apr 2007 19:48 GMT
/**
 * @(#)MyClock.java
 *
 * MyClock application
 *
 * @author kevin
 * @version 1.00 2007/4/4
 */
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.Calendar;

public class MyClock
    implements Runnable{
       
    Calendar now = Calendar.getInstance();
    int h = now.get(Calendar.HOUR_OF_DAY);
    int m = now.get(Calendar.MINUTE);
    int s = now.get(Calendar.SECOND);

public void showClock(){
    JTextField present;// holds display
   
      present = new JTextField(5); // create display
      present.setEditable(false);
      present.setFont(new Font("sansserif", Font.PLAIN, 48));

      JPanel content = new JPanel(); // put time in display
      content.setLayout(new FlowLayout());
      content.add(present);
      content.setVisible(true);

}// showClock

public void run(){
   
    while (true){
        showClock();
    }
}

    public static void main(String[] args) {
        Thread t = new Thread();
        t.start();
        System.out.println("Hello World!");

    }
}
Signature

Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom.

Joshua Cranmer - 07 Apr 2007 18:54 GMT
> /**
>  * @(#)MyClock.java
[quoted text clipped - 13 lines]
>     implements Runnable{ <snip>
> }

And what is your problem?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.