2 Replies - 3286 Views - Last Post: 06 February 2010 - 11:09 AM Rate Topic: -----

#1 pdbyrd  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-February 10

A simple JOptionPane.showImputDialog "cannot find symbol" erro

Posted 06 February 2010 - 10:59 AM

Here is my code:

import javax.swing.JOptionPane;
import java.text.DecimalFormat;

public class TestScoreApp
{
	public static void main(String[] args)
	{
		String imputString;
		double score1; 
		double score2;
		double score3;
		double average;
		
		TestScore studentOne = new TestScore(score1, score2, score3);
		
		imputString = JOptionPane.showImputDialog("What is score #1 ?");
		
		score1 = Double.parseDouble(imputString);
		
		imputString = JOptionPane.showImputDialog("What is score #2 ?");
		
		score2 = Double.parseDouble(imputString);
		
		imputString = JOptionPane.showImputDialog("What is score #3 ?");
		
		score3 = Double.parseDouble(imputString);
		
		System.exit(0);
	
	}
}


and the resultant error message:

----jGRASP exec: javac -g /Users/pbyrd/Programs/TestScoreApp.java
TestScoreApp.java:16: cannot find symbol
symbol : method showImputDialog(java.lang.String)
location: class javax.swing.JOptionPane
imputString = JOptionPane.showImputDialog("What is score #1 ?");
^
TestScoreApp.java:20: cannot find symbol
symbol : method showImputDialog(java.lang.String)
location: class javax.swing.JOptionPane
imputString = JOptionPane.showImputDialog("What is score #2 ?");
^
TestScoreApp.java:24: cannot find symbol
symbol : method showImputDialog(java.lang.String)
location: class javax.swing.JOptionPane
imputString = JOptionPane.showImputDialog("What is score #3 ?");
^
3 errors


Help appreciated! Thanks!

This post has been edited by pdbyrd: 06 February 2010 - 11:02 AM


Is This A Good Question/Topic? 0
  • +

Replies To: A simple JOptionPane.showImputDialog "cannot find symbol" erro

#2 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3089
  • View blog
  • Posts: 19,137
  • Joined: 14-September 07

Re: A simple JOptionPane.showImputDialog "cannot find symbol" erro

Posted 06 February 2010 - 11:05 AM

It's InputDialog not imput
Was This Post Helpful? 0
  • +
  • -

#3 pdbyrd  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 06-February 10

Re: A simple JOptionPane.showImputDialog "cannot find symbol" erro

Posted 06 February 2010 - 11:09 AM

wow. thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1