Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Applet not inialized

 
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);
}
}
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • 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...
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Applets.
 
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
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!