i made a Binary Calculator in Java GUI. IT contains:constructos,actionlistener,main funcion and so on. Now i want it to be also an applet. Application and applet in the same time. Unfortunately i cant make it happen.
/* <applet code = "Calculator" width = 320 height = 200> </applet> */
public class Calculator extends Applet implements ActionListener {
public static void main(String args[]) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new Calculator();
}
});
}
Applet applet = this;
public void init() {
new Calculator();
}
}
So I would be grateful if somebody could present the easiest way to transform it to the applet.Thank u in advance.