1 Replies - 1037 Views - Last Post: 05 October 2011 - 07:00 PM Rate Topic: -----

#1 mpettus  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-September 11

Arithmetic Operations

Posted 05 October 2011 - 06:52 PM

Having problems with this code its giving me one error



Error: Main method not found in class MultiplicationApplet, please define the ma
in method as:
public static void main(String[] args)


here is the code

import java.awt.Graphics; // program uses class Graphics
import javax.swing.JApplet; // program uses class JApplet
import javax.swing.JOptionPane; // program uses class JOptionPane

public class MultiplicationApplet extends JApplet
{
private double sum; // sum of the values entered by user


// intialize applet by obtaining values from user
public void init()
{

I think something needs to go somewhere up here .

Is This A Good Question/Topic? 0
  • +

Replies To: Arithmetic Operations

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,880
  • Joined: 06-March 08

Re: Arithmetic Operations

Posted 05 October 2011 - 07:00 PM

You try to run this program as an Application while it is an Applet
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1