Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Windows Desktop Applet

Reply
Thread Tools

Re: Windows Desktop Applet

 
 
John Stewart
Guest
Posts: n/a
 
      06-30-2003
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" <> wrote in message news:<WPJIa.480$>...
> 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" <> wrote in message
> newsxIIa.84575$...
> > 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
> >
> >

 
Reply With Quote
 
 
 
 
Andy Flowers
Guest
Posts: n/a
 
      06-30-2003
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" <> wrote in message
news: 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" <> wrote in message

news:<WPJIa.480$>...
> > 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" <> wrote in message
> > newsxIIa.84575$...
> > > 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
> > >
> > >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
struts/jsp/applet: sessionid doesn't work in applet for macs only Blah Blah Java 0 08-13-2003 02:51 AM
Cool Applet Cool Applet http://24.60.235.213/Grid/ Alisher Fatykhov Java 1 08-06-2003 04:32 AM
Re: newbie: Join JApplet & Applet in one applet Andrew Thompson Java 0 08-05-2003 01:41 PM
Re: play wave files using java.applet.Applet webster Java 0 07-20-2003 01:51 PM
applet vs. canvas in applet Rob Love Java 1 07-07-2003 10:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57