我有一个手机,她的名字叫:NOKIA 5300,我爱她,所以我觉得使用Java让她的思想更加丰富!

标准J2ME菜单

[不指定 2010/05/06 08:13 | by fubin ]
下载文件
这个文件只能在登入之后下载。请先 注册登入

滚球游戏

[不指定 2010/01/12 08:39 | by fubin ]
点击在新窗口中浏览此图片
下载文件
这个文件只能在登入之后下载。请先 注册登入

J2ME屏幕画线

[不指定 2010/01/11 08:37 | by fubin ]
下载文件
这个文件只能在登入之后下载。请先 注册登入

图形排列游戏

[不指定 2010/01/07 08:49 | by fubin ]
点击在新窗口中浏览此图片
下载文件
这个文件只能在登入之后下载。请先 注册登入

在屏幕上查找英文词汇

[不指定 2010/01/05 08:42 | by fubin ]
点击在新窗口中浏览此图片
下载文件
这个文件只能在登入之后下载。请先 注册登入

J2ME下实现XML解析

[不指定 2009/08/07 23:49 | by fubin ]
下载文件
这个文件只能在登入之后下载。请先 注册登入
Tags:

一个简单的J2me登陆窗口

[不指定 2008/09/26 13:25 | by fubin ]
/*
* A free J2ME sample program to demonstrate
* a SIMPLE LOGIN SCREEN TO LOGIN TO A HTTP SERVER
* FROM A J2ME phone
*
* @author William Alexander
* free for use as long as this comment is included in
* in the program as it is
* More Free Java programs available for download
* at http://www.java-samples.com
*
*/
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;  
import java.io.*;
import java.lang.*;
import javax.microedition.io.*;
import javax.microedition.rms.*;

public class Login extends MIDlet implements CommandListener {
   
  TextField UserName=null;
  TextField Location=null;
  Form authForm,mainscreen;
  TextBox t = null;
  StringBuffer b = new StringBuffer();
   private Display myDisplay = null;
   private Command okCommand = new Command("OK", Command.OK, 1);
   private Command exitCommand = new Command("Exit", Command.EXIT, 2);
   private Command backCommand = new Command("Back", Command.BACK, 2);
   private Alert alert = null;

   public Login() {        

       myDisplay = Display.getDisplay(this);

  UserName=new TextField("Your Name","",10,TextField.ANY);
  Location=new TextField("Location","",10,TextField.ANY);
  authForm=new Form("Identification");
  mainscreen=new Form("Logging IN");
  mainscreen.append("Logging in....");
  mainscreen.addCommand(backCommand);
  authForm.append(UserName);
  authForm.append(Location);
  authForm.addCommand(okCommand);
  authForm.addCommand(exitCommand);
  authForm.setCommandListener(this);
  myDisplay.setCurrent(authForm);

   }

   public void startApp() throws MIDletStateChangeException {
   }

   public void pauseApp() {
   }


 
   protected void destroyApp(boolean unconditional)
           throws MIDletStateChangeException {
   }

 
   public void commandAction(Command c, Displayable d) {
       
       if ((c == okCommand) && (d == authForm)) {
  if (UserName.getString().equals("") || Location.getString().equals("")){
    alert = new Alert("Error", "You should enter Username and Location", null, AlertType.ERROR);
    alert.setTimeout(Alert.FOREVER);
    myDisplay.setCurrent(alert);
  }
  else{
  //myDisplay.setCurrent(mainscreen);
  login(UserName.getString(),Location.getString());
  }
  }
       if ((c == backCommand) && (d == mainscreen)) {
    myDisplay.setCurrent(authForm);
  }
  if ((c == exitCommand) && (d == authForm)) {
    notifyDestroyed();
  }
  }
       
       public void login(String UserName,String PassWord) {
  HttpConnection connection=null;
  DataInputStream in=null;
  String url="http://www.cujava.com/";

  OutputStream out=null;  
  try
  {
    connection=(HttpConnection)Connector.open(url);
    connection.setRequestMethod(HttpConnection.POST);
    connection.setRequestProperty("IF-Modified-Since", "2 Oct 2002 15:10:15 GMT");
    connection.setRequestProperty("User-Agent","Profile/MIDP-1.0 Configuration/CLDC-1.0");
    connection.setRequestProperty("Content-Language", "en-CA");
    connection.setRequestProperty("Content-Length",""+ (UserName.length()+PassWord.length()));
    connection.setRequestProperty("UserName",UserName);
    connection.setRequestProperty("PassWord",PassWord);
  out = connection.openDataOutputStream();
  out.flush();
  in = connection.openDataInputStream();
  int ch;
  while((ch = in.read()) != -1) {
    b.append((char) ch);
    //System.out.println((char)ch);
  }
  //t = new TextBox("Reply",b.toString(),1024,0);
  mainscreen.append(b.toString());
  if(in!=null)
    in.close();
  if(out!=null)
    out.close();
  if(connection!=null)
    connection.close();
  }
  catch(IOException x){}
  myDisplay.setCurrent(mainscreen);
       
   }
}

J2ME基础练习代码

[不指定 2008/06/16 10:28 | by fubin ]

下载文件
这个文件只能在登入之后下载。请先 注册登入


   实现对文本显示的代码,虽然简单,但却非常实用。

我可爱的Nokia5300丢了

[不指定 2007/08/20 15:12 | by fubin ]
案件描述:今天中午,我最喜欢的一款手机:5300离我而去了,就在我从汽车后坐换到前坐的一杀那!我现在心情很差。

    我喜欢5300是因为我在它上面开发了我第一个java手机游戏和软件。我太伤心了。
控制一个小鸡过马路,过了以后从新开始。

这是J2me GameCanvas的基础功能。同时还演示图片在一定速度下想一个方向前进。

下载文件
这个文件只能在登入之后下载。请先 注册登入


分页: 1/2 第一页 [1] [2] 下页 最后页 [ 显示模式: 摘要 | 列表 ]