• Post Reply Bookmark Topic Watch Topic
  • New Topic

Applet not inialized

 
Nikhilesh Gandhi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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);
}
}
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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...
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Applets.
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • 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
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!