aspose file tools*
The moose likes Applets and the fly likes appletviewer error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "appletviewer error" Watch "appletviewer error" New topic
Author

appletviewer error

Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
What have I not done correctly?
APPLET
package Wrapper;
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
/*
*Learning to Create Windows
*Doco Mastadon
*02/23/03
*/
public class TryApplet extends JApplet
{
public void init ()
{
Container content = getContentPane ();//get content pane
content.setLayout (new FlowLayout (FlowLayout.RIGHT));//set layout
JButton button;//stores a button
Font[] fonts = { new Font ("Arial", Font.ITALIC, 10),
new Font ("Playbill", Font.PLAIN, 14)//two fonts
};
BevelBorder edge = new BevelBorder (BevelBorder.RAISED);//beveled border
//add the buttons using alternate fonts
for (int i = 1; i <= 6; i++)
{
content.add (button = new JButton ("Press " + i));//add the buttons
button.setFont (fonts[i % 2]);// one of our own
button.setBorder (edge);
}
}
}
HTML
<APPLET CODE="TryApplet.class" LANGUAGE=JAVASCRIPT WIDTH=300, HEIGHT=200>
</APPLET>
C:\appletviewer TryApplet.html
Produces the following error:
Exception in thread "main" java.util.MissingResourceException: Can't find resource for bundle sun.applet.resource.MsgAppletViewer, key appletpanel.badattribute.exception, etc.
TIA
doco


doco
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
I am beginning to wonder why bother with JAVA altogether if Gates controls 80%+ machines in the world and he stubbornly resists allowing use of Applets and other issues.
I have tried every posted fix for the above problem listed clear back to the beginning of the year and nothing works.
I have IE6 with XP OS. Applets simply will not work. VBScript is looking better all the time. :roll:
doco
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi doco,
first thing.
if u post something against java on JavaRanch you should be "absolutely" sure that its not your fault.
in this case it is your fault.
change your html. you don't follow standard HTML syntax.
you have comma in APPLET tag after width. that is invalid.
i got the same exception that you have but it was gone as soon as i corrected the comma error.
another thing, i don't understand the use of Language=JavaScript thing in Applet tag...where do you find this? i have never used it...
regards
maulin.
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi doco,
sorry if my wordings sounded little rude but somehow i couldn't just accept things without 100% surity about java not working ...you know...
regards
maulin.
Donald R. Cossitt
buckaroo
Ranch Hand

Joined: Jan 31, 2003
Posts: 401
Maulin;
No need for an appology, if I have a but chewing coming I'll take it. I was being entirely more rhetorical than necessarily critical. Nearly every post I read dealing with this issue was something to do with IE incompatiblily with JAVA; which caused me to wonder outloud.
doco
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: appletviewer error