-
Start: Applet not Intialized
Hi,
I was reading the forums and found one similar to the problem that I am having but I didn't get the answer I need. Anyway when I start my applet I get the "Start: Applet not Intialized" messege I cannot figure out why the form I designed won't display. I have been reading posts and java books for hours and I have not found anything that has helped me.
Any help would be appreciated. Here is my code.
RedRabbit
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class Exchange extends Applet implements ActionListener {
CheckboxGroup radioGroup;
Checkbox radioUS;
Checkbox radioEuro;
Checkbox radioChina;
Checkbox radioBrazil;
Checkbox radioPaki;
Button calcButton;
Button clearButton;
Button receiptButton;
Button quitButton;
TextField canField;
TextField exField;
public void init() {
initComponents();
radioGroup = new CheckboxGroup();
radioUS = new Checkbox("", radioGroup,true);
radioEuro = new Checkbox("", radioGroup,false);
radioPaki = new Checkbox("", radioGroup,false);
radioChina = new Checkbox("", radioGroup,false);
radioBrazil = new Checkbox("", radioGroup,false);
add(radioUS);
add(radioEuro);
add(radioPaki);
add(radioChina);
add(radioBrazil);
add(L1);
add(L2);
add(canField);
add(exField);
add(calcButton);
add(clearButton);
add(receiptButton);
add(quitButton);
// Attach actions to the components
calcButton.addActionListener(this);
clearButton.addActionListener(this);
receiptButton.addActionListener(this);
quitButton.addActionListener(this);
}
public void actionPerformed(ActionEvent evt)
{
if (evt.getSource() == calcButton)
repaint();
else if (evt.getSource() == clearButton)
{
clearButton.setLabel("Not here!");
canField.setText("That was the wrong button!");
repaint();
}
}
private void calcButtonActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
L2.setText("jlsdjlf");
}
// Variables declaration - do not modify
private java.awt.Label L1;
private java.awt.Label L2;
// End of variables declaration
}
-
hi,
I figured out my problem. I am new to java and I am using NetBeans. This piece of software is very helpful in that when you create you GUI it automatically generates a large portion of your code. I did not realize how much it actually created and this lead me to override what the computer had done. When I overrode the computers code it decided not to work.
Red Rabbit
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks