Java – JList items with icon

JavaIn 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

JAVA – Parsing given string to be used by java.awt.robot

JavaJava 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

JavaThe 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

JavaIn this article I’d like to present:

  • Example of Object serialization into JSON string
  • Deserialization of JSON string to the Object

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