package thearena;
import javax.swing.JOptionPane;
import java.util.Random;
public class Arena {
public static void main(String[] args) {
Object[] loading_choices = {"Yes","No"};
int action = JOptionPane.showOptionDialogue(null,
"Welcome to The Arena, a text based game featuring turn based combat.",
"The Arena",
JOptionPane.DEFAULT_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
loading_choices,
loading_choices[0]);
System.out.println("The user picked: " + loading_choices[action]);
}
}
That is my code for a game I am making. However, on the line
int action = JOptionPane.showOptionDialogue(null, ..
I get an error that says:
Cannot find symbol
symbol: method
showOptionDialogue(<null>,String,String,int,int,<null>,Object[],Object)
location: class JOptionPane
I am relatively new to java and just wanted to make a quick text based game that I am transferring over from another simpler language so I do not know what this error means or how to fix it so any help?
Fix the spelling. It's showOptionDialog
, not showOptionDialogue
.