In this article I’ll present a code snippet how to implement a JList in Java where items will be displayed like [icon] [item text] . Continue reading
Category Archives: Java
JAVA – Parsing given string to be used by java.awt.robot
Java Robot can be very usefull tool emulating e.g. pressing a key on your keyboard. Sometimes this can be difficult especially for non-standard characters like ‘asterisk’. Therefore I developed following piece of code which translates given string into separated chars, converts them to ASCII and Java Robot types them using ALT+ASCII_KEY Continue reading
Java – ANT script to build a project and sign the output archive
The ANT Script described in this article demonstrates how to build and compile a Java project, put it into signle JAR file and finally sign it using self-signed certificate. Continue reading
Java – JSON serialization
In this article I’d like to present:
- Example of Object serialization into JSON string
- Deserialization of JSON string to the Object
Java – Map ResultSet to Object dynamically
Did you ever wanted to implement simple mapping of database tables to java objects (models) and you wanted to do the whole stuff dynamically? I managed to put some code together which does exactly what you wanted Continue reading
Java – Build model from an instance of ResultSet
If you want to display a JTable that displays data from a DataBase ResultSet you can do it manually using JTable that displays data converted from database table ResultSet into Object [ ][ ].
Another approach is to build the JTable model dynamically using the ResultSet meta data. In this article you can see an example of how this can be achieved. Continue reading
Java – How to store Array of pairs
In this article you can see a sample code I use to store simple Key-Value pairs in another objects, i.e. List or ArrayList Continue reading
How to sign a Java code
Some commands in Java requires special permissions to run on client PC. This restrictions are applied especially when programming web applets. Continue reading