Ok so.. I've been trying to customize a dialog box.. I'm pretty new to this.. So this might be a stupid question.. But anyways...
Code:

Object [] options = {"Course I do!",
                "Not Really"};
        int n = JOptionPane.showOptionDialog (frame,
                "Do you Understand?",
                "Easy Question",
                JOptionPane.YES_NO_OPTION,
                JOptionPane.INFORMATION_MESSAGE,
                null,     //do not use a custom Icon
                options,  //the titles of buttons
                options [0]); //default button title

3 errors that cam up were "misplaced construct(s)" and Unexpected symbols ignored...
Both errors are in this part : Object [] options =
I don't know what to do.. Please help me out.
Thanks
-Soloz

Recommended Answers

All 2 Replies

Your post did not get formatted correctly. Please edit it to use code tags.

there is no error in the declaration of that array

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.