🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1151

Help!!! What is wrong with my code?

#1151
From: Qinhe Zheng
Date: Fri, 04 Jun 1999 00:00
24 lines
1196 bytes
hey guys, i am a java applet beginner. please tell me what is wrong with my
code.
i am suppose to write an applet that displays the current time when it
started. i want to
get it right so desperately. if you know whats wrong. pleassssee email me at
Qin@mingspring.com  thanks in advance.

import java.awt.*;
import java.applet.Applet;
import java.util.Date;

public class Clock extends Applet
{
 public void paint( Date g)
 {
  Date myTime = new Date();
  int myHour = myTime.getHours();
  int myMinute = myTime.getMinutes();
  int mySecond = myTime.getSeconds();

  g.drawString(myHour + myMinute);
 }

}
Technical Details
Message-ID: <7ja1n9$a0f$1@nntp6.atl.mindspring.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,7e24c88ff49a53a8,start
X-Google-Attributes: gid10d6db,public
From: "Qinhe Zheng" <qin@mindspring.com>
Subject: Help!!! What is wrong with my code?
Date: 1999/06/04
Message-ID: <7ja1n9$a0f$1@nntp6.atl.mindspring.net>
X-Deja-AN: 485896109
X-Priority: 3
X-Server-Date: 5 Jun 1999 02:23:37 GMT
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: MindSpring Enterprises
X-MSMail-Priority: Normal
Reply-To: "Qinhe Zheng" <qin@mindspring.com>
Newsgroups: aus.computers.java