Results 1 to 3 of 3
Thread: Control if it is a input
- 03-10-2009, 08:22 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 33
- Rep Power
- 0
Control if it is a input
What I am having problems with is that I need to put in a number (the number of the account), and if there is no input then the text "you have to enter a number".. The problem is that i dont know which method to use to control if a number is written in or not.. This is what i tried:
PHP Code:String TallLest = showInputDialog("LEDETEKST"); long kontoNummer = Long.parseLong(TallLest); while (kontoNummer == null || kontoNummer.trim().equals("")){ showMessageDialog(null, "Du må legge inn."); kontoNummer = showInputDialog("What, what, what..."); }
- 03-11-2009, 12:12 AM #2
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
modify as...kontoNummer = showInputDialog("What, what, what...");
kontoNummer = showInputDialog(null,"What, what, what...");
- 03-11-2009, 12:14 AM #3
Senior Member
- Join Date
- Dec 2008
- Posts
- 526
- Rep Power
- 0
Similar Threads
-
Focus control in SWT
By chandransuraj in forum SWT / JFaceReplies: 0Last Post: 01-28-2009, 02:17 PM -
Control on exe
By jazz2k8 in forum New To JavaReplies: 3Last Post: 08-14-2008, 02:06 PM -
control app width based on certain control
By thebillybobjr in forum SWT / JFaceReplies: 0Last Post: 05-15-2008, 04:52 PM -
How to remove Control Characters from an input file?
By renjan in forum Advanced JavaReplies: 0Last Post: 08-01-2007, 03:33 PM -
how to take input and verify input in Java programs
By bilal_ali_java in forum Advanced JavaReplies: 0Last Post: 07-21-2007, 08:46 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks