Ejemplo n.º 1
0
 @Override
 public void parentNotify(Container parent) throws VetoException {
   if (EventQueue.isDispatchThread()) {
     super.parentNotify(parent);
     // call getSwingComponent() early to ensure JComponent creation
     getSwingComponent();
   } else {
     throw new VetoException("Trying to install GUI component in GUI incompatible container.");
   }
 }