Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to not accept empty jfield?

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Thanked 0 Times in 0 Posts

    Default How to not accept empty jfield?

    Hi I'm new in java.
    I have my mysql code with making the PRIMARY KEY NOT NULL (which is the ITEM CODE) but when I tested it in java, it accepts EMPTY VALUE.
    How I can prompt the user that the ITEM CODE should not be EMPTY. It must always have a value inserted in JFIELD.

    Thank you!

  2. #2
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    My Mood
    Thanked 82 Times in 78 Posts
    Blog Entries

    Default Re: How to not accept empty jfield?

    Can't you google how to check for null or empty values?

Similar Threads

  1. extended JPanel is empty
    By pottsiex5 in forum AWT / Java Swing
    Replies: 4
    Last Post: November 26th, 2011, 03:59 PM
  2. [SOLVED] How do I make my program accept letters?
    By tyb97 in forum What's Wrong With My Code?
    Replies: 14
    Last Post: September 30th, 2011, 07:27 PM
  3. Replies: 1
    Last Post: August 29th, 2011, 08:32 PM
  4. Make JTextArea accept input from JButton
    By crazed8s in forum AWT / Java Swing
    Replies: 9
    Last Post: December 5th, 2010, 09:38 PM
  5. [SOLVED] Supressing empty lines and does not do until the end! Why ?
    By lumpy in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 18th, 2010, 07:38 AM