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

📄 main.java

📁 联网斗地主 java版本 用jbuilder2005编写
💻 JAVA
字号:
package poker;

import java.util.*;
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Displayable;
import javax.microedition.midlet.MIDlet;


public class main extends MIDlet {
 //public Display display;
   private static main instance;
   List imList;
   Command exitCmd,okCmd,downCmd,cancelCmd,helpCmd,closeCmd;
   boolean SystemError=false;
   Alert MsgBox=new Alert("ERROR");
   Form waitForm=new Form(" downloading...");
   String nowForm="";
   Timer one;
   //waitFor waitForTask;

  /** Constructor */
  public main() {
    try{
      instance = this;
      GetServicData.ServerImage=Image.createImage("/res/computer.gif");
      GetServicData.RoomImage = Image.createImage("/res/room.PNG");
      GetServicData.TableImage = Image.createImage("/res/table.png");
    }catch (Exception e){
      Error.errStr="Error when load image.";
      Error.errCode=2;
      return;
    }
  }

  /** Main method */
  public void startApp() {
    DataAccess da=DataAccess.getInstance();
    GameInfo.display=Display.getDisplay(this);
    GameInfo.midlet=this;
    Login loginForm;
    loginForm=new Login();
    GameInfo.display.setCurrent(loginForm);
    loginForm.drawFace();
  }

  /** Handle pausing the MIDlet */
  public void pauseApp() {
  }

  /** Handle destroying the MIDlet */
  public void destroyApp(boolean unconditional) {
      RoomList room = RoomList.getInstance();
      System.out.println("new room");
      try{
        room.one.cancel();
      }catch(Exception e){}
      System.out.println("room timer cancel");
      TableList table = TableList.getInstance();
      System.out.println("new table");
      try{
        table.one.cancel();
      }catch(Exception e){}
      System.out.println("table timer cancel");
      table.one=null;
      System.out.println("table.one = null");
      room=null;
      System.out.println("room = null");
      table=null;
      System.out.println("all timer has over");
      GameInfo.midlet.notifyDestroyed();
  }

  /** Quit the MIDlet */
  public static void quitApp() {

  }

}//end program

⌨️ 快捷键说明

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