rc> -----Original Message-----
rc> From: Horatio B. Bogbindero [mailto:[EMAIL PROTECTED]]
rc> Sent: Sunday, August 06, 2000 5:27 PM
rc> To: '[EMAIL PROTECTED]'
rc> Subject: Re: [plug] OT: java help
rc> 
rc> 
rc> 
rc> > > How would I convert the last line so that the date will 
rc> be viewed?
rc> > > 
rc> > > I tried compiling it with g.drawString(new Date(), 80, 
rc> 50) and this is what
rc> > > I encountered:
rc> > > 
rc> > > HelloDateGui.java:24: Incompatible type for method. 
rc> Explicit cast needed to
rc> > > convert java.util.Date to java.text.AttributedCharacterIterator.
rc> > >     g.drawString(new Date(), 80, 50);
rc> > > 
rc> > 
rc> > Try:
rc> > 
rc> > Date today = new Date();
rc> > g.drawString(Today is: "+today.toLocaleString());
rc> > 
rc> or simpler yet.
rc>  
rc> g.drawString(""+(new Date()), 80, 50);
rc> 
rc> this is a cheat i learned at work. if you want to ask more java
rc> related question move the discussions.
rc> 
rc> echo "subscribe" > mail [EMAIL PROTECTED]
rc> 
rc> or better yet hit the egroups website and subscribe to philjug.
rc> 

Thanks, I will subscribe. :-)
-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to