Added a Swing-friendly callbacks wrapper