Tag Archives: Animation

Command Chaining: From JQuery to Swing

JQuery is my favorite Javascript library for developing web-based applications. One of the things I really like is the ability chain commands together to reduce the code size. Here is an example from JQuery to hide and add an event handler to an HTML element.

$(document).ready(function() {
   $('#faq').find('dd').hide().end().find('dt').click(function() {
     $(this).next().slideToggle();
   });
 });

Inspired by the JQuery, I started to use the same command chaining technique in my Swing programs and libraries. I been spending some time developing an animation library designed with command chaining at the core.
READ MORE »

4 Ways to Capture a Screenshot

The ability to create a screenshot programmatically in Java code can be very useful. I personally use it to create my animated transitions.

Here are 4 ways to create a screenshot in Java.

READ MORE »

Easy animated transitions in Java Swing with TimingFrameworks

clockCreating animated transitions use to be a tedious task in Java Swing… until TimingFrameworks came along. TimingFrameworks (https://timingframework.dev.java.net/), written by Chet Haase, is a library for making Java animation and timing-based control easier. There are two good introductory articles on their website worth reading.

Crash course in animation

Below is the code to move a JFrame 100 pixels from left to right in 1 second.

READ MORE »