+ 1

I want to make a movie quiz in Java. How to make pop up boxes that have the question and 4 multiple choices to click right ans?

Multiple Choice pop up boxes in Java

18th Oct 2018, 4:53 PM
Moe
Moe - avatar
6 Réponses
+ 4
not possible here probably! you can do it in pc though
18th Oct 2018, 7:41 PM
Roneel
Roneel - avatar
25th Oct 2018, 7:29 PM
Roneel
Roneel - avatar
+ 3
Object[] possibilities = {"ham", "spam", "yam", " other"}; String s = (String)JOptionPane.showInputDialog( frame, "Choose your favourite:\n" + "\"Food...\"", "Customized Dialog", JOptionPane.PLAIN_MESSAGE, icon, possibilities, "ham"); I found from oracle official documentation and edited. this will represent pulldown menu. there is other option of creating 4 buttons also if you don't want pulldown menu
25th Oct 2018, 8:21 PM
Roneel
Roneel - avatar
+ 2
Thank you very much I'll look this up in Oracle docs for the buttons option :)
25th Oct 2018, 8:29 PM
Moe
Moe - avatar
+ 1
yes I intend to do this on pc not sololearn...
25th Oct 2018, 7:14 PM
Moe
Moe - avatar
+ 1
Oh I know about JoptionPane. I was wondering how to have multiple choice in the JoptionPane. A B C D answers for the user to click on right answer
25th Oct 2018, 8:01 PM
Moe
Moe - avatar