Ejemplo n.º 1
0
    public void propertyChange(PropertyChangeEvent e) {
      String name = e.getPropertyName();
      JInternalFrame jif = (JInternalFrame) e.getSource();

      if (!(jif.getUI() instanceof InternalFrameUI)) {
        return;
      }

      InternalFrameUI ui = (InternalFrameUI) jif.getUI();

      if (name.equals(FRAME_TYPE)) {
        if (e.getNewValue() instanceof String) {
          ui.setFrameType((String) e.getNewValue());
        }
      } else if (name.equals(IS_PALETTE)) {
        if (e.getNewValue() != null) {
          ui.setPalette(((Boolean) e.getNewValue()).booleanValue());
        } else {
          ui.setPalette(false);
        }
      } else if (name.equals(JInternalFrame.CONTENT_PANE_PROPERTY)) {
        ui.stripContentBorder(e.getNewValue());
      }
    }
Ejemplo n.º 2
0
  // ´°¿ÚµÄ»ù±¾ÅäÖÃ
  public void initWindow() {
    dispose();
    setUndecorated(true);
    setRootPaneCheckingEnabled(false);
    setSize(380, 296);
    setResizable(false);
    javax.swing.plaf.InternalFrameUI jf = jif.getUI();
    ((javax.swing.plaf.basic.BasicInternalFrameUI) jf).setNorthPane(null);
    jif.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 2));
    jif.setSize(380, 296);
    jif.setEnabled(false);

    jsetup.setBounds(287, -2, 28, 20);
    jclose.setBounds(343, -2, 39, 20);
    jmin.setBounds(315, -2, 28, 20);
    jif.getContentPane().add(jsetup);
    jif.getContentPane().add(jclose);
    jif.getContentPane().add(jmin);

    setJLabel(header);
    header.setBounds(20, 140, 87, 87);
    jif.getContentPane().add(header);

    setJLabel(photo);
    photo.setBounds(23, 142, 83, 83);
    jif.getContentPane().add(photo);

    userInput.setBounds(118, 142, 188, 25);
    userInput.setEditable(true);
    userInput.setFont(new Font("Times New Roman", 0, 14));
    jif.getContentPane().add(userInput);

    setJLabel(register);
    register.setBounds(316, 144, 51, 16);
    jif.getContentPane().add(register);

    pwdInput.setBounds(118, 175, 188, 25);
    jif.getContentPane().add(pwdInput);

    setJLabel(minaFind);
    minaFind.setBounds(316, 178, 51, 16);
    jif.getContentPane().add(minaFind);

    remPwd.setBounds(117, 210, 72, 16);
    jif.getContentPane().add(remPwd);
    setJCheckbox(remPwd);

    autoLogin.setBounds(202, 210, 72, 16);
    jif.getContentPane().add(autoLogin);
    setJCheckbox(autoLogin);

    setJLabel(swit);
    swit.setBounds(15, 255, 25, 25);
    jif.getContentPane().add(swit);

    setButton(jlogin);
    jlogin.setBounds(115, 247, 165, 40);
    jlogin.setFont(new Font("ËÎÌå", 0, 12));
    jlogin.setIconTextGap(-108);
    jif.getContentPane().add(jlogin);

    setJLabel(right);
    right.setBounds(333, 248, 38, 38);
    jif.getContentPane().add(right);

    setJLabel(state);
    state.setBounds(92, 210, 11, 11);
    jif.getContentPane().add(state, 3);

    setWindowDray(jif);
    jif.getContentPane().add(bg);
    getContentPane().add(jif);
    setLocation(
        (Toolkit.getDefaultToolkit().getScreenSize().width - getSize().width) / 2,
        (Toolkit.getDefaultToolkit().getScreenSize().height - getSize().height) / 2);
    setButton(jsetup);
    setButton(jclose);
    setButton(jmin);

    this.setTitle("PQQ-http://www.yanyulin.info");
    this.setIconImage(new ImageIcon(getClass().getResource("pics/xiaomi.jpg")).getImage());
    setAlwaysOnTop(true);
    jif.setVisible(true);
    setVisible(true);
  }