> > 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());
>
or simpler yet.
g.drawString(""+(new Date()), 80, 50);
this is a cheat i learned at work. if you want to ask more java
related question move the discussions.
echo "subscribe" > mail [EMAIL PROTECTED]
or better yet hit the egroups website and subscribe to philjug.
---------------------
[EMAIL PROTECTED]
Every little picofarad has a nanohenry all its own.
-- Don Vonada
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]