Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 30th, 2008, 11:27 AM   #21
Freaky Chris
Professional Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 274
Rep Power: 1 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
Re: Snytax error

Java Syntax (Toggle Plain Text)
  1. String choose= JOptionPane.showInputDialog(menu + Option1 + Option2+ Option3+ Option4+Option5);

You forget to specify the parent component.

Java Syntax (Toggle Plain Text)
  1. String choose= JOptionPane.showInputDialog(ParentComponent, menu + Option1 + Option2+ Option3+ Option4+Option5);

You were tryiny to say that menu + option1...... was the name of the parent and then not specify a message.

Cheers,
Chris
__________________
Steven Skiena - Algorithms

,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],
brainf**k -- It's such a pretty language
Freaky Chris is offline   Reply With Quote
Old Apr 30th, 2008, 12:47 PM   #22
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
Re: Snytax error

i didn't know about parent component... what is it by the way?? can you explain it to me
A.K.Al Shamsi is offline   Reply With Quote
Old Apr 30th, 2008, 1:06 PM   #23
Freaky Chris
Professional Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 274
Rep Power: 1 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
Re: Snytax error

it just gives the dialog box a parent nothing much to it. It also provides the Co-ords that the dialog box uses. You do not need to specify a parent frame as you can just set it equal to null. This will then use a default frame and the dialog box will be centred

 String choose= JOptionPane.showInputDialog(null, menu + Option1 + Option2+ Option3+ Option4+Option5);
Should work fine for you.

This page covers these things, Java Doc - JOptionPane.showInputDialog

Chris
__________________
Steven Skiena - Algorithms

,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],
brainf**k -- It's such a pretty language
Freaky Chris is offline   Reply With Quote
Old May 1st, 2008, 5:24 AM   #24
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
Re: Snytax error

thank you...
A.K.Al Shamsi is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic Socket Programming Error in Linux.. Pls help boraciner C++ 18 Sep 12th, 2007 1:17 AM
C# corruption!!! Kilo C++ 32 May 21st, 2006 8:44 PM
Masm rsnd Assembly 4 May 20th, 2006 9:05 PM
libraries matko C 1 Jan 22nd, 2006 2:12 PM
String error in if statement Blighttdm C 12 Nov 18th, 2005 6:34 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:36 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC