General question regarding Java, Jpanel, and SQL and preferred method of interacting between them all

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.

General question regarding Java, Jpanel, and SQL and preferred method of interacting between them all

Please be patient with me as I attempt to assemble my question.

Let's assume I have a table that has three fields in it. Two of the fields are strings, and the third field is a integer. In the Java world when setting up your jpanel and your fields, do most programmers setup that integer field as a string on the screen, then convert it to a number under the covers before writing it to a table via sql? Or do they typically leave them as an numeric(integer) field on the screen? Additionally, is the preferred method to assign the sql field values equal to the jfield values, or is it preferred to define a group of variables that the jfield information is moved into, and then move the variables into the SQL fields? I am just trying to get a feel for the best method to achieve these things.

Additionally, if numbers are not typed in to a numeric(INT) field, then do we want to store NULL values to that field in that table, or is it preferred we store the value 0?

I hope all of that made sense. I am new to the java world, but hardly new to programming. I appreciate your patience, and thanks for taking the time to read through this.