To check which jTextfields are empty and stop saving details to Database (I DO NOTt want to disable Jbutton) : I have this code sample to see which Jtextfield is empty. I have attached a image of my application too. All I need to know is that, when a user was not entering the details in a specific jTextfield, and then click "Register" button, I want the user to be informed about his mistake/s like;

"You haven't entered Student Middle Name" or "You have not entered Student Address" or "You haven't entered Student middle name and Address"

***and I DO NOT WANT TO INFORM USER as 
"You have not entered all the details"***

but I do need to Inform him is that;

"You haven't entered Student Middle Name" or 
"You have not entered Student Address" or 
"You haven't entered Student middle name and Address"

in a jLabel.

I want the user to inform SPECIFICALLY which jTextfield/s is/are EMPTY and set its/Their background/s RED and the jTextFields which are already filled should remain still and stop saving the details into database until he fills all the JtextFields. I have tried many codes but any of it didn't work :(

Here's my Code. I have used the array to check the Jtextfield/s are empty or not, but I don't know how to inform the user which Jtextfield/s is/are causing the problem. Please Help Me :(

I DO NOT WANT TO DISABLE jButton when user has not inserted all the details.



    public void checkEmpty() {
        String fname = jTextField1.getText();
        String mname = jTextField2.getText();
        String lname = jTextField3.getText();

        String lineone = jTextField4.getText();
        String linetwo = jTextField5.getText();
        String linethree = jTextField6.getText();

        int fnam = fname.length();
        int mnam = mname.length();
        int lnam = lname.length();
        int lineon = lineone.length();
        int linetw = linetwo.length();
        int linethre = linethree.length();

        int[] check = {fnam, mnam, lnam, lineon, linetw, linethre};
        for (int i = 0; i < check.length; i++) {
            if (check[i] == 0) {
                
            } else {
                
            }
        }
    }

