/**
   * ������ѡ����
   *
   * @param cp ����Ҫ�ı�Ŀؼ�
   * @param style ���ܽ����±�
   * @return ���سɹ��������
   */
  public static boolean setUI(Component cp, int style) {

    try {
      switch (style) {
        case 0:
          UIManager.setLookAndFeel("com.sun.java.swing.plaf." + "windows.WindowsLookAndFeel");
          break;
        case 1:
          UIManager.setLookAndFeel("javax.swing.plaf." + "metal.MetalLookAndFeel");
          break;
        case 2:
          UIManager.setLookAndFeel("com.sun.java.swing.plaf." + "motif.MotifLookAndFeel");
          break;
        case 3:
          UIManager.setLookAndFeel(
              "com.sun.java.swing.plaf." + "windows.WindowsClassicLookAndFeel");
          break;
        case 4:
          UIManager.setLookAndFeel("com.incors.plaf." + "alloy.AlloyLookAndFeel");
          break;
        case 5:
          UIManager.setLookAndFeel("soft.wes.feels." + "GlassThemeAlloyLookAndFeel");
          break;
        case 6:
          UIManager.setLookAndFeel("soft.wes.feels." + "AcidThemeAlloyLookAndFeel");
          break;
        case 7:
          UIManager.setLookAndFeel("soft.wes.feels." + "BedouinThemeAlloyLookAndFeel");
          break;
        case 8:
          UIManager.setLookAndFeel("soft.wes.feels." + "DefaultThemeAlloyLookAndFeel");
          break;
        case 9:
          UIManager.put("swing.boldMetal", Boolean.FALSE);
          // �����öԻ������
          JDialog.setDefaultLookAndFeelDecorated(true);
          // �������������
          JFrame.setDefaultLookAndFeelDecorated(true);
          Toolkit.getDefaultToolkit().setDynamicLayout(true);
          System.setProperty("sun.awt.noerasebackground", "true");
          UIManager.setLookAndFeel(new MetalLookAndFeel());
          break;
      }
    } catch (Exception ex) {
      JOptionPane.showMessageDialog(null, "����ʧ��,��ԭ�����ʾ");
      return false;
    }
    SwingUtilities.updateComponentTreeUI(cp);
    cp.repaint();

    return true;
  }
  @Override
  public UIDefaults getDefaults() {
    try {
      final Method superMethod = BasicLookAndFeel.class.getDeclaredMethod("getDefaults");
      superMethod.setAccessible(true);
      final UIDefaults metalDefaults = (UIDefaults) superMethod.invoke(new MetalLookAndFeel());

      final UIDefaults defaults = (UIDefaults) superMethod.invoke(base);
      if (SystemInfo.isLinux) {
        if (!Registry.is("darcula.use.native.fonts.on.linux")) {
          Font font = findFont("DejaVu Sans");
          if (font != null) {
            for (Object key : defaults.keySet()) {
              if (key instanceof String && ((String) key).endsWith(".font")) {
                defaults.put(key, new FontUIResource(font.deriveFont(13f)));
              }
            }
          }
        } else if (Arrays.asList("CN", "JP", "KR", "TW")
            .contains(Locale.getDefault().getCountry())) {
          for (Object key : defaults.keySet()) {
            if (key instanceof String && ((String) key).endsWith(".font")) {
              final Font font = defaults.getFont(key);
              if (font != null) {
                defaults.put(key, new FontUIResource("Dialog", font.getStyle(), font.getSize()));
              }
            }
          }
        }
      }

      LafManagerImpl.initInputMapDefaults(defaults);
      initIdeaDefaults(defaults);
      patchStyledEditorKit(defaults);
      patchComboBox(metalDefaults, defaults);
      defaults.remove("Spinner.arrowButtonBorder");
      defaults.put("Spinner.arrowButtonSize", JBUI.size(16, 5).asUIResource());
      MetalLookAndFeel.setCurrentTheme(createMetalTheme());
      if (SystemInfo.isWindows && Registry.is("ide.win.frame.decoration")) {
        JFrame.setDefaultLookAndFeelDecorated(true);
        JDialog.setDefaultLookAndFeelDecorated(true);
      }
      if (SystemInfo.isLinux && JBUI.isHiDPI()) {
        applySystemFonts(defaults);
      }
      defaults.put("EditorPane.font", defaults.getFont("TextField.font"));
      return defaults;
    } catch (Exception e) {
      log(e);
    }
    return super.getDefaults();
  }
  public serverdown() {
    super();
    JFrame.setDefaultLookAndFeelDecorated(true);
    JDialog.setDefaultLookAndFeelDecorated(true);

    try {
      UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    } catch (Exception ex) {
      // System.out.println("Failed loading L&F: ");
      // System.out.println(ex);
    }
    initializeComponent();
    //
    // TODO: Add any constructor code after initializeComponent call
    //

    this.setVisible(true);
  }