Java Basic Problems

Java JTable Cell and JTextField: How to use and assign JTextField in JTable cell.

I think, to assign a JTextField in JTable cells is really important for the purpose of JTable cell validation. For many purpose in software development where we use JTable may need to use JTable cell validation  and for this validation purpose we may also need to assign and use JTextField in JTable cell. In the given Example, I have assigned and used  a JTextField  in the  Column 2  of the following JTable. Just Copy the code and Run it in your computer.

Continue reading “Java JTable Cell and JTextField: How to use and assign JTextField in JTable cell.”

Java Basic Problems

JTable Cell Validation: How to make JTable Cell allow or accept only integer (numeric) number/data.

JTable Cell ValidationSometimes in programming while we do our work with JTable cell, we may need to make the JTable cell Such that it will allow or accept only numeric or number type data from users and will not allow any other type of data in that cell. In the following example(Check the picture), I have made the cells of Column-2 such that  they will allow only numeric data and it will show a warning message if   any character or string type entry is detected.  Just Copy the code and run it.