• Post Reply Bookmark Topic Watch Topic
  • New Topic

java 1.2 applets  RSS feed

Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This message is an amplified version of an erlier plea for help.
I am [painfully] aware that current browsers are not Swing enabled, and that the Sun-supplied plugin is supposed to make them play like a Victrola. HOWEVER...Even though the plugin is installed, simple applets (like hello, world) comprising only JApplet children and owning only a JLabel instance will not init.
Here is the code
import java.awt.*;
import javax.swing.*;
import com.symantec.itools.javax.swing.borders.BevelBorder;
* A basic extension of the javax.swing.JApplet class
public class JAppletHello extends JApplet
public void init()
// Take out this line if you don't use symantec.itools.net.RelativeURL or symantec.itools.awt.util.StatusScroller

// This line prevents the "Swing: checked access to system event queue" message seen in some browsers.
getRootPane().putClientProperty("defeatSystemEventQueueCheck", Boolean.TRUE);

// This code is automatically generated by Visual Cafe when you add
// components to the visual environment. It instantiates and initializes
// the components. To modify the code, only use code syntax that matches
// what Visual Cafe can generate, or Visual Cafe may be unable to back
// parse your Java file into its visual environment.
JLblHello.setText("HELLO, WORLD!!!");
JLblHello.setFont(new Font("Dialog", Font.BOLD|Font.ITALIC, 40));
//$$ bevelBorder1.move(0,267);
javax.swing.JLabel JLblHello = new javax.swing.JLabel();
com.symantec.itools.javax.swing.borders.BevelBorder bevelBorder1 = new com.symantec.itools.javax.swing.borders.BevelBorder();

And here is the HTML code I used:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Mike Roper">
<meta name="GENERATOR" content="Mozilla/4.51 [en] (WinNT; I) [Netscape]">
<EMBED type="application/x-java-applet;version=1.2"
java_CODE = "HelloWorld2.class"
java_CODEBASE = "D:\VisualCafe\Projects\cryptor\"
java_ARCHIVE = "HelloWorld2.jar"
WIDTH = 500 HEIGHT = 600
The archive, codebase, and code are as noted.
The applet loads in Netscape 4.5 but will not init. When I run it under VCafe, it runs just fine. Did I forget to do something?
Help, please.
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops...I just found out that the project name and class name are different. Sorry to take anyone's time. Please disregard the post.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!