• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Applet not inialized

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
import java.awt.*;
import javax.swing.*;
import java.applet.*;
/*
<applet code =" Info.Class" width= 300 height=300 >
</applet>
*/
public class Info extends JApplet {

Container contentPane = getContentPane();

JButtonEnter = new JButton("Enter");
JButtonCancel = new JButton("Cancel");
JLabel Luna = new JLabel(" User Name");
JLabel Luco = new JLabel(" User Code");
JLabel Lupd = new JLabel(" User Password");
JLabel Lust = new JLabel(" User Status");

JTextFieldTuna = new JTextField();
JTextFieldTuco = new JTextField();
JTextFieldTupd = new JTextField();
JTextFieldTust = new JTextField();
public void init() {
Insets insets = contentPane.getInsets();
contentPane.setLayout(null);

contentPane.add(Luna);
Luna.setBounds(15 + insets.left, 40 + insets.top, 105, 20);
contentPane.add(Tuna);
Tuna.setBounds(115 + insets.left, 40 + insets.top, 105, 20);
contentPane.add(Luco);
Luco.setBounds(15 + insets.left, 65 + insets.top, 105, 20);
contentPane.add(Tuco);
Tuco.setBounds(115 + insets.left, 65 + insets.top, 105, 20);
contentPane.add(Lupd);
Lupd.setBounds(15 + insets.left, 90 + insets.top, 105, 20);
contentPane.add(Tupd);
Tupd.setBounds(115 + insets.left, 90 + insets.top, 105, 20);
contentPane.add(Lust);
Lust.setBounds(15 + insets.left, 115 + insets.top, 105, 20);
contentPane.add(Tust);
Tust.setBounds(115 + insets.left, 115+ insets.top, 105, 20);
}
}
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What browser and OS are you using? Do you have the Java Plugin installed?

"Applet not initialized" is just a generic error message that just means "there was an error and I couldn't create the applet." To see what caused this, you'll need to pull up the Java Console. The way to pull up the Java Console varies depending on the answers to the questions at the start of my post...
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Applets.
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nikhilesh
I observed that in the applet html you have,
code =" Info.Class"
where the class extension starts in Caps. use Info.class instead and see if it works
Regards
Maulin
 
Would anybody like some fudge? I made it an hour ago. And it goes well with a tiny ad ...
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic