473,414 Members | 1,663 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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

/**
* @(#)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!");

}
}
--
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.
Apr 5 '07 #1
1 2498
llloyd wood wrote:
/**
* @(#)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{ <snip>
}
And what is your problem?
Apr 7 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: George W. Jackson | last post by:
Hi to all. We have a Microsoft Access 2002 database that is referencing the ADO 2.5 library (as well as the DAO 3.6 library). On the development machine, the database works exactly as planned...
2
by: Scott | last post by:
In my database, I have a form with a subform. I had everything working correctly - the correct records would display on the subform for each record on the form. I could edit, add, and delete on the...
3
by: S. van Beek | last post by:
Dear reader, To work with linked tables is a professional method of working with a frond end and back end mdb. Working with linked tables on a local pc gives an acceptable performance but...
4
by: anand | last post by:
In my website i want to trace the event when user log off from the site by closing the explorer so i am unable to run any server side program at that time and my session_onend event also not...
5
by: Martin Heuckeroth | last post by:
Hi We are working on a webservice application and are having some problems with the cookies and/or sessions. We have them working on our intranet but then its not working on the internet. We...
3
by: Woody Splawn | last post by:
For reasons I have not yet identified my Help, Search and Help, Index has quit working. That is, in the VB IDE, from the Help menu, I can select Dynamic help or Contents and things work as...
2
latitude
by: latitude | last post by:
Have had a few questions here but no replies so far so thought id give it one more go: Im working on a textviewer/editor and have used autodetect url on it, and it has worked fine. But somewhere...
1
by: codeinthedark | last post by:
I'm hoping someone will be able to help me with an issue relating to working with unmanaged C++. I've been able to get most things working with regard to mapping from unmanaged C++ to C#, but the...
1
by: anupam roy | last post by:
Hi All, I want to perform basic Edit menu functionalities on my custom design surface. While all the Cut/Copy/Paste/Deelete/Select functionalities working fine with code below,Undo/Redo standard...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.