Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
acual and formal arguments differ in length?
I this segment of code:
int startChoice = JOptionPane.showConfirmDialog(null,
"Who starts this game?",
"Starter?",
"X, please!",
"O, please!",
JOptionPane.YES_NO_OPTION,
JOptionPane.QUESTION_MESSAGE,
red);
and it's giving me that error. I know what it means, I just can't fix it. I was trying to edit the button texts, but it isn't working. Help?
@Ok - I actually already tried that, and it still doesn't work.
@ TheBig - I already found that website, and I tried to use their example, but it didn't work either. :/
@ TheBig - The problem is, those are old documentations, and they don't work with Java 7 (I upgraded). I couldn't find the Java 7 docs. :/ I acually found a way to do it (the array probably isn't necessary, but i'm new to arrays, so I'm trying to use them as much as I can to see how they work.) :
Object[] options = {"X, please!",
"O, please!"};
int startChoice = JOptionPane.showOptionDialog(null,
"Who do you want to go first?",
"Starter?",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE,
null,
options,
options[1]);
1 Answer
- thebig_a_27Lv 59 years agoFavorite Answer
http://docs.oracle.com/javase/tutorial/uiswing/com...
edit - If the documentation from the creators of Java can't help you.. I certainly can't.
edit again - You are confused. That documentation absolutely applies to Java 7. Your own "solution" is identical to the example contained in that same documentation!