This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes 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

JavaRanch » Java Forums » Java » Java in General
Bookmark "Display Error messages" Watch "Display Error messages" New topic

Display Error messages

Sander Silva

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: 11654

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

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