示例#1
0
  public static IUmenu mainAE() {
    PerfilesBD coleccion = new PerfilesBD();
    final PerfilesBD perfilesDB = coleccion;
    String ip = "";
    try {
      ip = InetAddress.getLocalHost().getHostAddress();
    } catch (Exception exp) {
    }
    ipServer = ip;
    final String ipDef = ip;
    if (!coleccion.estaMontadoServidor()) {

      new Thread() {
        public void run() {

          try {
            Servidor servidor = new Servidor();
            servidor.ejecutarServidor();
          } catch (Exception e) {
            System.out.println(e);
          }
        }
      }.start();
      /*new Thread()
      {
              public void run()
              {

                      try
                      {
                              ServidorChat servidorChat = new ServidorChat();
                              servidorChat.ejecutarServidor();
                      }
                      catch (Exception e)
                      {
                              System.out.println(e);
                      }
              }
      }.start();*/
      new Thread() {
        public void run() {

          try {
            ClienteAdm clienteAdm = new ClienteAdm(ipDef);
          } catch (Exception e) {
            System.out.println(e);
          }
        }
      }.start();
    }

    String hostOut = coleccion.getHostServidor();

    IUmenu a = new IUmenu(hostOut);
    a.setBounds(120, 70, 800, 600);
    a.setUndecorated(true);
    a.getRootPane().setWindowDecorationStyle(0);
    a.setDefaultCloseOperation(a.DO_NOTHING_ON_CLOSE);
    a.setResizable(false);
    a.setVisible(true);
    menu = a;
    return a;
  }