DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   Quick Java Problem (http://www.daniweb.com/forums/thread158697.html)

Soloz Nov 20th, 2008 11:10 pm
Quick Java Problem
 
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!",<br />
                "Not Really"};<br />
        int n = JOptionPane.showOptionDialog (frame,<br />
                "Do you Understand?",<br />
                "Easy Question",<br />
                JOptionPane.YES_NO_OPTION,<br />
                JOptionPane.INFORMATION_MESSAGE,<br />
                null,     //do not use a custom Icon<br />
                options,  //the titles of buttons<br />
                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

destin Nov 20th, 2008 11:42 pm
Re: Quick Java Problem
 
Your post did not get formatted correctly. Please edit it to use code tags.

stultuske Nov 21st, 2008 4:32 am
Re: Quick Java Problem
 
there is no error in the declaration of that array


All times are GMT -4. The time now is 7:47 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC