C:\Documents and Settings\ben\Desktop\park>javac BenHultinProg7.java
.\Prog7.java:90: cannot find symbol
symbol : method equalsIgnoreCase(java.lang.String)
location: class javax.swing.JOptionPane
if (inPut1.equalsIgnoreCase("red")) {
^
.\Prog7.java:100: cannot find symbol
symbol : method equalsIgnoreCase(java.lang.String)
location: class javax.swing.JOptionPane
if (inPut2.equalsIgnoreCase("white")) {
^
.\Prog7.java:109: cannot find symbol
symbol : method equalsIgnoreCase(java.lang.String)
location: class javax.swing.JOptionPane
if (inPut3.equalsIgnoreCase("yellow")) {
^
.\Prog7.java:118: cannot find symbol
symbol : method equalsIgnoreCase(java.lang.String)
location: class javax.swing.JOptionPane
if (inPut4.equalsIgnoreCase("green")) {
^
.\Prog7.java:127: cannot find symbol
symbol : method equalsIgnoreCase(java.lang.String)
location: class javax.swing.JOptionPane
if (inPut5.equalsIgnoreCase("blue")) {
^
5 errors
C:\Documents and Settings\ben\Desktop\park>
How would I get the value from the JOptionPane and save it into a variable?
Ben Hultin wrote:Thanks for the response, but I am not trying to compare two separate JOptionPane inputs with each other. I am trying to compare if:
inPut1.equalsIgnoreCase("red");
Besides i am not sure if you suggestion would work, its the .equalsIgnoreCase() that is not being found by the JVM. How would I make the .equalsIgnoreCase() method found?
I have used this method several times in the past without a problem, so I dont why its causing a problem now or how to fix it.
.\Prog7.java:90: cannot find symbol
symbol : method equalsIgnoreCase(java.lang.String)
location: class javax.swing.JOptionPane
if (inPut1.equalsIgnoreCase("red")) {
Consider Paul's rocket mass heater. |