@Override
 public void removeNotify() {
   // This method gets called when this Preview is removed.
   super.removeNotify();
 }
 @Override
 public void addNotify() {
   // This method gets called when this Preview is added.
   engine.update(null, false);
   super.addNotify();
 }