How to populate data from database into JTable in Netbeans?
Suppose we had a table called Employee in our MS Access database and we want to retrieve and display all the data in a JTable component using NetBeans IDE. How to do that and what are the codes that we need to modify?
Panel in Java can be customized to paint different color than the default color.
This can be done by overriding paintComponent method of the JPanel.
We normally like to write complex algorithm to sort an array in Java where many of us overlooked the Arrays class in Java which can be very handy in sorting an array.The Arrays class has a static method called sort which exists in many overloaded versions so you can pass in an array of any primitive type, or pass in an array of Strings or other Objects.
Let say we have a Collection of elements which we want to do some operations,
for example shuffling the elements in a Vector.
In this cases, the shuffle static method will be very usefull in helping out to do the job.
We don’t even need to think of complicated algorithms to shuffle the Vector elements.
The shuffle method is [...]