• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is Swing without plugin possible or not?  RSS feed

Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am attempting to include a table control in my applet, and naturally am having trouble doing it with AWT. I have seen several postings on SUN's message site in which people say they have gotten swing to work by including the swing classes (either all of them or just the ones they need) in the jar file which contains their applet to be downloaded. We want to avoid the browser plugin as this will be for external customer use. Here is what I have tried:
I have unpacked the swingall.jar file into a directory. Placed my applet class (source below) in the root directory. Made a new JAR with the com and javax folders, and my applet class. All I am trying to do is add a JLabel.
import javax.swing.*;
import java.applet.*;
import java.awt.*;
public class MyApplet extends Applet {
public void init() {
JLabel j = new JLabel("Hello from swing");
TextField t = new TextField("Hello from AWT");
public void paint(Graphics g) {

What i get when I run this (in Netscape, IE4 and IE5) is the error below. If anyone can help me, I would surely appreciate it.
Thanks in advance,
com.ms.security.SecurityExceptionEx[javax/swing/plaf/metal/DefaultMetalTheme.<init>]: Unable to access system property: swing.plaf.metal.controlFont
at com/ms/security/permissions/PropertyPermission.check (PropertyPermission.java)
at com/ms/security/PolicyEngine.shallowCheck (PolicyEngine.java)
at com/ms/security/PolicyEngine.checkCallersPermission (PolicyEngine.java)
at com/ms/security/StandardSecurityManager.chk (StandardSecurityManager.java)
at com/ms/security/StandardSecurityManager.checkPropertyAccess (StandardSecurityManager.java)
at java/awt/Font.getFont (Font.java)
at javax/swing/plaf/metal/DefaultMetalTheme.<init> (DefaultMetalTheme.java:59)
at javax/swing/plaf/metal/MetalLookAndFeel.createDefaultTheme (MetalLookAndFeel.java:709)
at javax/swing/plaf/metal/MetalLookAndFeel.getDefaults (MetalLookAndFeel.java:714)
at javax/swing/UIManager.setLookAndFeel (UIManager.java:363)
at javax/swing/UIManager.setLookAndFeel (UIManager.java:383)
at javax/swing/UIManager.initializeDefaultLAF (UIManager.java:848)
at javax/swing/UIManager.initialize (UIManager.java:927)
at javax/swing/UIManager.maybeInitialize (UIManager.java:945)
at javax/swing/UIManager.getUI (UIManager.java:560)
at javax/swing/text/JTextComponent.updateUI (JTextComponent.java:396)
at javax/swing/text/JTextComponent.<init> (JTextComponent.java:356)
at javax/swing/JTextField.<init> (JTextField.java:204)
at javax/swing/JTextField.<init> (JTextField.java:185)
at MyApplet.init (MyApplet.java:9)
at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
at com/ms/applet/AppletPanel.run (AppletPanel.java)
at java/lang/Thread.run (Thread.java)
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
browser requires java1.2 plugin for supportin swing components
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!