Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Re: Windows Desktop Applet (http://www.velocityreviews.com/forums/t123878-re-windows-desktop-applet.html)

John Stewart 06-30-2003 06:41 PM

Re: Windows Desktop Applet
 
I turned off the jit compiler and have the use plugin checked in
internet options. But other than that im not sure.
John Stewart

"Andy Flowers" <andrew.flowers@npspam.ntlworld.com> wrote in message news:<WPJIa.480$yw5.12457@newsfep4-glfd.server.ntli.net>...
> Are you using the microsoft VM or that plug-in VM ?
>
> I have read elsewhere (a long time ago) that the desktop version needs the
> Microsoft VM.
>
> "jvstewart" <john@webjudo.net> wrote in message
> news:oxIIa.84575$zm1.35773@twister.nyroc.rr.com...
> > I have a html file set as the background for my Windows XP Desktop. I

> made
> > a simple applet that gets the current date and time and displays it on the
> > desktop. I cant get anything but the gray rectangle where the text should
> > appear. I have another applet i downloaded from the web that works fine.
> >
> > here is the code i am using in my applet:
> >
> > import java.applet.Applet;
> > import java.awt.*;
> > import java.text.*;
> > import java.util.*;
> >
> >
> > public class TimeDate extends Applet {
> >
> > String dateTime;
> > int x;
> >
> > public void init() {}
> > public void start() {
> > repaint();
> > }
> >
> > public void stop() {}
> >
> > public void destroy() {}
> >
> > public void paint(Graphics g)
> > {
> > DateFormat df = DateFormat.getDateInstance();
> > DateFormat tf = DateFormat.getTimeInstance();
> >
> > Date dt = new Date();
> > dateTime = df.format(dt);
> > Date tm = new Date();
> >
> > dateTime = dateTime + " " + tf.format(tm);
> >
> > //Graphics2D g2 = (Graphics2D)g;
> > Rectangle r = new Rectangle(0,0,200,25);
> > //g.setColor(Color.blue);
> > //g.fill(r);
> > g.setColor(Color.white);
> > g.drawString(dateTime,5,20);
> > }
> > };
> >
> >
> > Here is the html i am using
> >
> > <applet code="c:\j2sdk1.4.1\bin\TimeDate.class" width=200
> > height=25></applet>
> >
> > Anyone have any ideas?
> >
> > Thank you
> > John Stewart
> >
> >


Andy Flowers 06-30-2003 07:14 PM

Re: Windows Desktop Applet
 
You're using the external plug-in, this is the SUN Java. Uncheck the check
box to use the Microsoft VM (you may need to reboot for it to have an
effect) and see what happens.

"John Stewart" <john@webjudo.net> wrote in message
news:c2213e64.0306301041.255fd41b@posting.google.c om...
> I turned off the jit compiler and have the use plugin checked in
> internet options. But other than that im not sure.
> John Stewart
>
> "Andy Flowers" <andrew.flowers@npspam.ntlworld.com> wrote in message

news:<WPJIa.480$yw5.12457@newsfep4-glfd.server.ntli.net>...
> > Are you using the microsoft VM or that plug-in VM ?
> >
> > I have read elsewhere (a long time ago) that the desktop version needs

the
> > Microsoft VM.
> >
> > "jvstewart" <john@webjudo.net> wrote in message
> > news:oxIIa.84575$zm1.35773@twister.nyroc.rr.com...
> > > I have a html file set as the background for my Windows XP Desktop. I

> > made
> > > a simple applet that gets the current date and time and displays it on

the
> > > desktop. I cant get anything but the gray rectangle where the text

should
> > > appear. I have another applet i downloaded from the web that works

fine.
> > >
> > > here is the code i am using in my applet:
> > >
> > > import java.applet.Applet;
> > > import java.awt.*;
> > > import java.text.*;
> > > import java.util.*;
> > >
> > >
> > > public class TimeDate extends Applet {
> > >
> > > String dateTime;
> > > int x;
> > >
> > > public void init() {}
> > > public void start() {
> > > repaint();
> > > }
> > >
> > > public void stop() {}
> > >
> > > public void destroy() {}
> > >
> > > public void paint(Graphics g)
> > > {
> > > DateFormat df = DateFormat.getDateInstance();
> > > DateFormat tf = DateFormat.getTimeInstance();
> > >
> > > Date dt = new Date();
> > > dateTime = df.format(dt);
> > > Date tm = new Date();
> > >
> > > dateTime = dateTime + " " + tf.format(tm);
> > >
> > > //Graphics2D g2 = (Graphics2D)g;
> > > Rectangle r = new Rectangle(0,0,200,25);
> > > //g.setColor(Color.blue);
> > > //g.fill(r);
> > > g.setColor(Color.white);
> > > g.drawString(dateTime,5,20);
> > > }
> > > };
> > >
> > >
> > > Here is the html i am using
> > >
> > > <applet code="c:\j2sdk1.4.1\bin\TimeDate.class" width=200
> > > height=25></applet>
> > >
> > > Anyone have any ideas?
> > >
> > > Thank you
> > > John Stewart
> > >
> > >





All times are GMT. The time now is 03:01 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.