Re: Problem to handle long
DavidChew,
You simply need to convert the long to a String object.
The Graphics.drawString() method takes a String only.
Do this:Date earlierDate = new Date(71,7,1,7,10);
long earliersecs = earlierDate.getTime();
public void paint(Graphics g) {
String earlierSecsString = Long.toString(earliersecs);
g.drawString(earlierSecsString ,10,50);
}
This should work for you.
Look at the API for the java.util.* classes for different type conversions. They are really handy.
Regards,
dogBear