Article View: borland.public.jbuilder.java.swing
Article #1409How do you have the user input an integer using JOptionPane.showInputDialog
From: DementiaT
Date: Sat, 20 Dec 2003 09:08
Date: Sat, 20 Dec 2003 09:08
19 lines
1862 bytes
1862 bytes
Beginner here :) Im trying to do just that...have the user enter an integer into the dialog box... my code is: ... int invQty; invQty = JOptionPane.showInputDialog (null, "What is the quantity of \"" + invName + "\"?","Enter Quantity", JOptionPane.QUESTION_MESSAGE); ... I get an incompatible type error... it seems JOptionPane.showInputDialog only accepts strings? Thanks :)
Technical Details
Message-ID:
<o548uvshiobdff6str8j1rgvc5o25oqd3f@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!news.giganews.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,27de1d2f359fcaca,start X-Google-Attributes: gid111d45,public X-Google-ArrivalTime: 2003-12-20 01:08:45 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 20 Dec 2003 03:08:44 -0600 From: DementiaT <dementiat@high.net> Newsgroups: borland.public.jbuilder.java.swing Subject: How do you have the user input an integer using JOptionPane.showInputDialog Date: Sat, 20 Dec 2003 01:08:52 -0800 Organization: Penetration, Inc. Message-ID: <o548uvshiobdff6str8j1rgvc5o25oqd3f@4ax.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 21 X-Trace: sv3-h1OmFqTY6lIVVvgf57iXrI5z9/LA8FFHVGyXsU3JCOX5M+O4whAbywhIAuVGzdPSNw7iC4wfHpTvGS2!U4h+zu1xcKwy7S0gom++wShraYfeyzpJPGtiq/HkbALIldjIU9KHEz/7unbfqCbrdDdgXg== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1