1 Replies - 302 Views - Last Post: 19 April 2012 - 05:28 AM Rate Topic: -----

#1 habbab  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 10-October 10

where's the error?

Posted 19 April 2012 - 05:12 AM

import javax.swing.*;
public class ClubMember{
String name;
double weight;
double height;

public void clubMember(String n,double w, double h){
	name = n;
	weight = w;
	height = h;
}

public void setWeight(double w1){
	weight =w1;
}
public double getWeight(){
	return weight;
}
public void showHealthStatus(){
	double BMI;
	BMI=weight / (height * height);
	if(BMI < 25)
	JOptionpane.showMessageDialog("","Normal Weight");
	else
	JOptionpane.showMessageDialog("","Over Weight");
}


}


import javax.swing.*;
public class ClubMember{
String name;
double weight;
double height;

public void clubMember(String n,double w, double h){
	name = n;
	weight = w;
	height = h;
}

public void setWeight(double w1){
	weight =w1;
}
public double getWeight(){
	return weight;
}
public void showHealthStatus(){
	double BMI;
	BMI=weight / (height * height);
	if(BMI < 25)
	JOptionpane.showMessageDialog("","Normal Weight");
	else
	JOptionpane.showMessageDialog("","Over Weight");
}


}



ClubMember.java:25: cannot find symbol
symbol : variable JOptionpane
location: class ClubMember
JOptionpane.showMessageDialog("","Over Weight");
^

This post has been edited by Atli: 19 April 2012 - 05:21 AM
Reason for edit:: Please use [code] tags when posting code.


Is This A Good Question/Topic? 0
  • +

Replies To: where's the error?

#2 oha055  Icon User is offline

  • D.I.C Regular

Reputation: 48
  • View blog
  • Posts: 250
  • Joined: 02-February 09

Re: where's the error?

Posted 19 April 2012 - 05:28 AM

JOptionPane instead of JOptionpane :)
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1