This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes Display Error messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Display Error messages" Watch "Display Error messages" New topic
Author

Display Error messages

Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Hi all

I'm using a Java GUI to insert data into MS Access database.
Please kindly help me to display an error message like this,

I have a field called SVID (integer)

I need to display an error message when someone trying to add
more than 8 numbers or lower than 8 numbers. It should be only 8
digits. Need to display a message like this "Please add 8 digit ID".

here's my code.



Please kindly help, I'm new to Java.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11285
    
  59

Your code example is only showing the SQL (and once again, ignoring prepared statements). Where is the code for your GUI?


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Sander Silva
Greenhorn

Joined: May 15, 2011
Posts: 28
Thank you very much for response,

Here's the code

 
 
subject: Display Error messages
 
Similar Threads
insert to database...
Delete Records form Database
Update Database
JOptionPane dialog box is not displaying
How to Update Database