Code snippets of advanced application of Java Swing