🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #9300

catching an exception to cancel button on dialogs

#9300
From: Dann-o
Date: Tue, 25 Apr 2000 00:00
10 lines
1046 bytes
I am reading data entered into the TextField on a ShowInputDialog into a
variable.
I have added some try and catch blocks to catch a NumberFormatException.
All this is working fine, until the cancel button is pressed.  At this point
java treats the pressing of the cancel button as an exception.

Is there a standard method for fixing this in java?

thanks
Dann-o
Technical Details
Message-ID: <956695494.23664.0.nnrp-01.c1edeee8@news.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,9e95d7c1deb4d39a,start
X-Google-Attributes: gid111d45,public
From: "Dann-o" <danny@ruttle.demon.co.uk>
Subject: catching an exception to cancel button on dialogs
Date: 2000/04/25
Message-ID: <956695494.23664.0.nnrp-01.c1edeee8@news.demon.co.uk>
X-Deja-AN: 615615986
X-NNTP-Posting-Host: ruttle.demon.co.uk:193.237.238.232
X-Trace: news.demon.co.uk 956695494 nnrp-01:23664 NO-IDENT ruttle.demon.co.uk:193.237.238.232
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Newsgroups: borland.public.jbuilder.java.swing
X-Complaints-To: abuse@demon.net