I copied this code from netbeans for a JApplet.. and it has two init methods
One is public void init() that calls another initComponents() method.
And the initComponents() method has all the components defined in it, and it is private.
I replaced private with public and changed initComponents to init, and then deleted all the init method, it worked that way.
But why there two methods when you can put every thing in single init() method?
The init() method has this code in it:
public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
initComponents();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}