@Override
public void removeNotify() {
super.removeNotify();
// flashPlayer is destroyed on finalization.
// Rather than wait for garbage collection, release when the component is removed from its parent.
flashPlayer.disposeNativePeer();
}
};
flashPlayer.setControlBarVisible(false);
flashPlayer.load(SimpleFlashExample.class, "resource/Movement-pointer_or_click.swf");
contentPane.add(flashPlayer, BorderLayout.CENTER);