Example #1
0
 /**
  * Reverses configuration which was done on the specified component during installUI. This method
  * is invoked when this UIComponent instance is being removed as the UI delegate for the specified
  * component. This method should undo the configuration performed in installUI, being careful to
  * leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific
  * property objects, etc.). This should include the following: 1. Remove any UI-set borders from
  * the component. 2. Remove any UI-set layout managers on the component. 3. Remove any UI-added
  * sub-components from the component. 4. Remove any UI-added event/property listeners from the
  * component. 5. Remove any UI-installed keyboard UI from the component. 6. Nullify any allocated
  * instance data objects to allow for GC.
  *
  * @param c - the component to uninstall the ui on
  */
 public void uninstallUI(JComponent c) {
   JScrollBar hsb = scrollpane.getHorizontalScrollBar();
   hsb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, null);
   JScrollBar vsb = scrollpane.getVerticalScrollBar();
   vsb.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, null);
   super.uninstallUI(c);
 }