On Sun, 6 Aug 2000, Ronneil Camara wrote:
> How would I convert the last line so that the date will be viewed?
>
> I tried compiling it with g.drawString(new Date(), 80, 50) and this is what
> I encountered:
>
> HelloDateGui.java:24: Incompatible type for method. Explicit cast needed to
> convert java.util.Date to java.text.AttributedCharacterIterator.
> g.drawString(new Date(), 80, 50);
>
Try:
Date today = new Date();
g.drawString(Today is: "+today.toLocaleString());
--
you can also use toGMTString() method.
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]