Having problems with this code, basically once the applet starts up all that is displayed is "The sum is 0.0". The Option panes are not poping up at all.
Java 1.7 / Eclipse.
Also getting a warning @ public class Practice : The serializable class Practice does not declare a static final serialVersionUID field of type long.
If anyone knows what the means that would be super helpful, Any help is much appreciated.
I went ahead and uploaded the applet : http://Pixeltainment.comule.com
import java.awt.*; import javax.swing.*; public class Practice extends JApplet { // What the Init method is .. is basically being about to put stuff ... in it ? private double sum; public void inti(){ // Init() is short for initialization String fn = JOptionPane.showInputDialog("Enter first Number"); String sn = JOptionPane.showInputDialog("Enter second number"); // Convert the string to double double n1 = Double.parseDouble(fn); double n2 = Double.parseDouble(sn); sum = n1 + n2; } public void paint(Graphics g){ super.paint(g); g.drawString("The sum is "+sum, 25 , 50); } }