This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 11432
    
  85

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

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Display Error messages