Click to See Complete Forum and Search --> : Applets on Active Desktop
Virtual24
Mar 26th, 2005, 02:53 AM
My problem is simple. I want to load a page onto my active desktop that has an applet embeded in it. I know the applet works because when I load it in IE it works. In the active desktop, I just get a grey square (which, at least, is the size its supposed to be) I have jdk1.5 and winXPpro. Why won't the applet load or view properly in the active desktop???
System_Error
Mar 26th, 2005, 07:49 AM
Most likely, java is not enabled on it, or not supported. Since I think active desktop supports java, then it's probably that java is not enabled. As for how you enable it, I don't know.
Virtual24
Mar 26th, 2005, 02:17 PM
Well I don't think that java need to be enabled for the active desktop, since it just uses IE. I can't find information on that anywhere. The only things I can think of are iffy. One could be that I need a CDF file for the applet... although it does not access the internet so I don't see why I would need that. The other is that the html file and applet are just stored on my hard drive. Perhaps IE isn't realizing that and trying to look for the applet on the web???? Any help???
System_Error
Mar 26th, 2005, 02:35 PM
Is the class file and the html file in the same folder?
Virtual24
Mar 26th, 2005, 03:56 PM
Yes. I've tried both having just the class file in the same folder and in a jar in the same folder. I even tried setting the codebase parameter to the same folder. It all works in IE but not on the desktop. Its just really weird; like the desktop isn't finding the class file even though its right there...
Heres the code for both the HTML and applet if that'll help...
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body><center>
<applet code="JApplet001" archive="JApplet001.jar" width="600" height="400">
Ignored...
</applet>
</center></body>
</html>
and Applet:
public class JApplet001 extends javax.swing.JApplet
{
public void init()
{
try {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
initGUI();
}
});
} catch (Exception e) {
System.err.println("createGUI didn't successfully complete");
}
}
public void initGUI()
{
javax.swing.JPanel jp = new javax.swing.JPanel();
javax.swing.JButton jb = new javax.swing.JButton( "CLICK!!!" );
jp.setLayout( new java.awt.FlowLayout() );
jp.add( jb );
getContentPane().setLayout( new java.awt.BorderLayout() );
jp.setBackground( java.awt.Color.BLACK );
getContentPane().add( jp, java.awt.BorderLayout.CENTER );
}
public void start(){}
public void stop(){}
}
System_Error
Mar 27th, 2005, 06:30 AM
I don't see anything wrong with your code. Do you mind providing a download link to active desktop? I will download it, and see if I can get it to work.
Virtual24
Mar 27th, 2005, 01:30 PM
If there is a download link... I have no idea what it is. As far as I know its just a part of the windows desktop.
Just access Display Properties, then to the desktop tab, then click Customize My Desktop, then to the Web tab and add a page...
System_Error
Mar 27th, 2005, 07:58 PM
I had the same problem when I tried loading an applet. My guess, is that it's using Microsoft's VM instead of java's. Somehow, we need to find a way to change this this.
NoteMe
Mar 28th, 2005, 09:40 AM
WOuldn't it be easier to upload it to a server that can handle applets, and use the active desktop from there. At least if you are on a broadband.
ии
NoteMe
Mar 28th, 2005, 10:08 AM
Just as a test. See if you can make this one work on your machine. I just tested it on my XP machine. And it works.
http://vbforums.com/attachment.php?attachmentid=35105
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.