Start: Applet not Intialized


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Start: Applet not Intialized

  1. #1
    Join Date
    Mar 2005
    Posts
    8

    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

    }

  2. #2
    Join Date
    Mar 2005
    Posts
    8
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center