⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changepasswd.java

📁 j2me实现的移动警务的大概框架
💻 JAVA
字号:
package PoliceSearch.Login;

import javax.microedition.lcdui.*;
import PoliceSearch.IntegratedInformation.*;
import PoliceSearch.Com.*;
import PoliceSearch.*;

/**
 * <p>Title: 江西公安手机辅助查询系统</p>
 * <p>Description: 章桂华等</p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: 个人</p>
 * @author 章桂华等
 * @version 1.0
 */

public class ChangePasswd extends Form implements CommandListener{
  Alert confirmAlert;
  TextField oldPsswd;
  TextField newPasswd;
  TextField repeatPwd;
  IntegratedInfMenu parent;

  public ChangePasswd(IntegratedInfMenu iiMenu) {
    super("修改用户密码界面");
    parent = iiMenu;
    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }
  private void jbInit() throws Exception {
    oldPsswd = new TextField("", "", 15,TextField.ANY);
    newPasswd = new TextField("", "", 15,TextField.ANY);
    repeatPwd = new TextField("", "", 15,TextField.ANY);
    repeatPwd.setLabel("重复密码");
    repeatPwd.setConstraints(TextField.PASSWORD);
    repeatPwd.setString("12345678");
    newPasswd.setLabel("设置密码");
    newPasswd.setConstraints(TextField.PASSWORD);
    newPasswd.setMaxSize(15);
    newPasswd.setString("12345678");
    oldPsswd.setLabel("旧密码");
    oldPsswd.setConstraints(TextField.ANY);
    oldPsswd.setMaxSize(20);
    oldPsswd.setString("8736938Wer");
    this.append(oldPsswd);
    this.append(newPasswd);
    this.append(repeatPwd);
    addCommand(Resources.Cmd_Queren);
    addCommand(Resources.Cmd_Quxiao);
    setCommandListener(this);
    confirmAlert = new Alert("修改密码成功","",null,AlertType.CONFIRMATION);
    confirmAlert.addCommand(Resources.Cmd_Queren);
    confirmAlert.setCommandListener(this);
  }

  /**
   * 功能:显示当前页面
   */
  public void display() {
    Display.getDisplay(PoliceMain.instance).setCurrent(this);
  }

  public void commandAction(Command command, Displayable displayable) {
    int pos = 1;
    if (command.equals(Resources.Cmd_Quxiao) && displayable.equals(this)) {
      parent.displaySubMenu();
    }
    if (command.equals(Resources.Cmd_Queren) && displayable.equals(confirmAlert)) {
      parent.displaySubMenu();
    }
    if (command.equals(Resources.Cmd_Queren) && displayable.equals(this)) {
      Display.getDisplay(PoliceMain.instance).setCurrent(confirmAlert);
//      parent.displaySubMenu();
    }
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -