Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Is Swing without plugin possible or not?

Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
Bill[javax/swing/plaf/metal/DefaultMetalTheme.<init>]: Unable to access system property: swing.plaf.metal.controlFont
at com/ms/security/permissions/PropertyPermission.check (
at com/ms/security/PolicyEngine.shallowCheck (
at com/ms/security/PolicyEngine.checkCallersPermission (
at com/ms/security/StandardSecurityManager.chk (
at com/ms/security/StandardSecurityManager.checkPropertyAccess (
at java/awt/Font.getFont (
at javax/swing/plaf/metal/DefaultMetalTheme.<init> (
at javax/swing/plaf/metal/MetalLookAndFeel.createDefaultTheme (
at javax/swing/plaf/metal/MetalLookAndFeel.getDefaults (
at javax/swing/UIManager.setLookAndFeel (
at javax/swing/UIManager.setLookAndFeel (
at javax/swing/UIManager.initializeDefaultLAF (
at javax/swing/UIManager.initialize (
at javax/swing/UIManager.maybeInitialize (
at javax/swing/UIManager.getUI (
at javax/swing/text/JTextComponent.updateUI (
at javax/swing/text/JTextComponent.<init> (
at javax/swing/JTextField.<init> (
at javax/swing/JTextField.<init> (
at MyApplet.init (
at com/ms/applet/AppletPanel.securedCall0 (
at com/ms/applet/AppletPanel.securedCall (
at com/ms/applet/AppletPanel.processSentEvent (
at com/ms/applet/AppletPanel.processSentEvent (
at com/ms/applet/ (
at java/lang/ (
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
browser requires java1.2 plugin for supportin swing components
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic