In software programming (especially Graphical User Interface or GUI programming), many times, we need to load data from file or database into a table or list to be displayed to user on computer screen. Most of the time, the size of the data can be determined only during runtime. The data could be very small to a few rows of record and could be very large to a few millions rows … [Read more...]
Java: Format Long Integer Into Hexadecimal String
In software programming, sometime you may want to convert a long integer or integer into hexadecimal string for viewing purpose or also as a text format to be stored in text file or database. The Java API itself does not have a class or function to convert a long into a fixed 16 characters hexadecimal string or an integer into fixed 8 characters hexadecimal string. The … [Read more...]
Java: Mortgage Payment Calculator
Mortgage Payment Calculator is a tool to calculate the monthly repayment for a fixed rate mortgage. The calculator is written in Java programming language (Java Applet) and can be ran at any web browser. You must have Java plug-in installed on your computer in order to run this web application. … [Read more...]
Java: Stop A Thread Correctly
In Java programming, it is very common to use threads to perform multi tasks simultaneously. Starting a thread is pretty easy but stopping a thread might be a headache for some programmers, especially when the thread needs to run a task that takes some times. … [Read more...]
Java: Format Bytes Array into Hexadecimal String
Sometimes, we may want to format a bytes array into hexadecimal (base-16) format for debugging purpose or for better readability. One byte has 8 bits and one byte can be represent by two hexadecimal characters (0 - 15 and A - F). … [Read more...]