锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品一区二区在线观看,久久97精品,国产成人精品国内自产拍免费看http://www.aygfsteel.com/yanyan/category/42837.htmljava boyzh-cnThu, 10 Dec 2009 18:27:04 GMTThu, 10 Dec 2009 18:27:04 GMT60 璁板綍搴撴搷浣滃伐鍏風被http://www.aygfsteel.com/yanyan/archive/2009/12/10/305470.htmljavazjavazThu, 10 Dec 2009 11:09:00 GMThttp://www.aygfsteel.com/yanyan/archive/2009/12/10/305470.htmlhttp://www.aygfsteel.com/yanyan/comments/305470.htmlhttp://www.aygfsteel.com/yanyan/archive/2009/12/10/305470.html#Feedback0http://www.aygfsteel.com/yanyan/comments/commentRss/305470.htmlhttp://www.aygfsteel.com/yanyan/services/trackbacks/305470.html
import javax.microedition.rms.InvalidRecordIDException;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
import javax.microedition.rms.RecordStoreFullException;
import javax.microedition.rms.RecordStoreNotFoundException;
import javax.microedition.rms.RecordStoreNotOpenException;


public class RecordStoreUtil {
public RecordStore openARecondStore(String rsname){
    RecordStore rs=null;
    if(rsname.length()>32) return null;
    try{
         rs=RecordStore.openRecordStore(rsname,true);
    }catch(RecordStoreFullException notFoundException){

    }catch(RecordStoreNotFoundException notFoundException){

    }catch(RecordStoreException notFoundException){

    }finally{
        return rs;
    }
}
public RecordStore openARecordStoreExisted(String rsname){
    RecordStore rs=null;
    if(rsname.length()>32)return null;
   try{
         rs=RecordStore.openRecordStore(rsname,false);
    }catch(RecordStoreFullException notFoundException){

    }catch(RecordStoreNotFoundException notFoundException){

    }catch(RecordStoreException notFoundException){

    }finally{
        return rs;
    }
}
 //鍒犻櫎
public static boolean delRecordStore(String rsname){
    //
    if(rsname.length()>32)return false;
    //

   try{
       RecordStore.deleteRecordStore(rsname);

   }catch(Exception e){
       return false;
   }
    return true;
}
//娣誨姞
public static int writeString(RecordStore rs,String myString){
    byte[] b=myString.getBytes();
    int id=-1;
    try{
        id=rs.addRecord(b, 0, b.length);

    }catch(Exception e){
        //
   
}
    return id;
}

//鑾峰彇
public static String getString(RecordStore rs,int id){
        try {
            byte[] b = rs.getRecord(id);
            return (new String(b));
        } catch (RecordStoreNotOpenException ex) {
            ex.printStackTrace();
        } catch (InvalidRecordIDException ex) {
            ex.printStackTrace();
        } catch (RecordStoreException ex) {
            ex.printStackTrace();
        }
        return null;

}
//淇敼
public static void setString(RecordStore rs,int id,String newString){
    byte[] b=newString.getBytes();
        try {
            rs.setRecord(id, b, 0, b.length);
        } catch (Exception ex) {

        }
}
//娣誨姞璇佷功鏁版嵁璁板綍
public static int writeInt(RecordStore rs,int myInt){
    int id=-1;
    String myString=(new Integer(myInt)).toString();
    id=writeString(rs,myString);
    return id;
}
//鑾峰彇
public static int getInt(RecordStore rs,int id){
    int result=Integer.MAX_VALUE;
    String s=getString(rs,id);
    try{
    result=Integer.parseInt(s);
    }catch(Exception e){

    }
    return result;
}
//淇敼
public static void setInt(RecordStore rs,int newInt){
    String myString=(new Integer(newInt)).toString();
}

 

 

 

 


}



javaz 2009-12-10 19:09 鍙戣〃璇勮
]]>
闈欏鎬?/title><link>http://www.aygfsteel.com/yanyan/archive/2009/12/01/304428.html</link><dc:creator>javaz</dc:creator><author>javaz</author><pubDate>Tue, 01 Dec 2009 12:25:00 GMT</pubDate><guid>http://www.aygfsteel.com/yanyan/archive/2009/12/01/304428.html</guid><wfw:comment>http://www.aygfsteel.com/yanyan/comments/304428.html</wfw:comment><comments>http://www.aygfsteel.com/yanyan/archive/2009/12/01/304428.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/yanyan/comments/commentRss/304428.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/yanyan/services/trackbacks/304428.html</trackback:ping><description><![CDATA[<p> </p> <p>import javax.microedition.lcdui.*;<br /> import javax.microedition.midlet.*;</p> <p><br /> public class GraphicsTest extends MIDlet{<br />   private Display display;</p> <p>    public GraphicsTest() {<br />         display=Display.getDisplay(this);</p> <p>    }</p> <p>    protected void destroyApp(boolean unconditional)  {</p> <p><br />     }</p> <p>    protected void pauseApp() {</p> <p>    }</p> <p>    protected void startApp(){<br />      MyCanvas mc=new MyCanvas();<br />      display.setCurrent(mc);<br />     }</p> <p><br /> }<br /> class MyCanvas extends Canvas {</p> <p>    public void paint(Graphics g){<br />      int width=getWidth();<br />      int height=getHeight();<br /> String a[]={"闈欏鎬?,"鏉庣櫧","搴婂墠鏄庢湀鍏?,"鐤戞槸鍦頒笂闇?,"涓懼ご鏈涙槑鏈?,"浣庡ご鎬濇晠涔?};<br />      g.setColor(0);<br />      g.fillRect(0, 0, width, height);</p> <p>    <br />      g.setColor(0Xffff00);<br />      Font font=g.getFont();<br />      font=Font.getFont(Font.FACE_PROPORTIONAL,Font.STYLE_UNDERLINED,Font.SIZE_LARGE);<br />      g.setFont(font);<br />      for(int i=0;i<a.length;i++){<br />          g.drawString(a[i], 0, i*20,Graphics.LEFT|Graphics.BASELINE );<br />      }<br />     <br />     }</p> <p>}</p> <p> //--------------------------------------------------------------------------------------------<br /> 鍒╃敤縐誨姩鍘熺偣鍧愭爣鍔ㄨ搗鏉ヤ箣鍚庣殑闈欏鎬?br /> </p> <p>import javax.microedition.lcdui.*;<br /> import javax.microedition.midlet.*;</p> <p><br /> public class GraphicsTest extends MIDlet{<br />   private Display display;</p> <p>    public GraphicsTest() {<br />         display=Display.getDisplay(this);</p> <p>    }</p> <p>    protected void destroyApp(boolean unconditional)  {</p> <p><br />     }</p> <p>    protected void pauseApp() {</p> <p>    }</p> <p>    protected void startApp(){<br />      MyCanvas mc=new MyCanvas();<br />      display.setCurrent(mc);<br />     }</p> <p><br /> }<br /> class MyCanvas extends Canvas {<br /> int aa=300;</p> <p>MyCanvas(){<br /> Walk w = new Walk();<br />   w.start();<br /> }<br />     public void paint(Graphics g){<br />      int width=getWidth();<br />      int height=getHeight();<br /> String a[]={"闈欏鎬?,"鏉庣櫧","搴婂墠鏄庢湀鍏?,"鐤戞槸鍦頒笂闇?,"涓懼ご鏈涙槑鏈?,"浣庡ご鎬濇晠涔?};<br />      g.setColor(0);<br />      g.fillRect(0, 0, width, height);</p> <p><br />      g.setColor(0Xffff00);<br />      g.translate(80,aa);<br />      Font font=g.getFont();</p> <p>     font=Font.getFont(Font.FACE_PROPORTIONAL,Font.FACE_SYSTEM,Font.SIZE_LARGE);<br />      g.setFont(font);<br />      for(int i=0;i<a.length;i++){<br />          g.drawString(a[i], 0, i*20,20);<br />      }</p> <p>    }</p> <p><br /> class Walk extends Thread{</p> <p>  public void run(){<br />    while(aa>80){<br />     aa--;<br />     repaint();<br />     try{<br />      sleep(50);<br />     }catch(Exception ee){}<br />    }<br />   }<br />  }</p> <p>}</p> <img src ="http://www.aygfsteel.com/yanyan/aggbug/304428.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/yanyan/" target="_blank">javaz</a> 2009-12-01 20:25 <a href="http://www.aygfsteel.com/yanyan/archive/2009/12/01/304428.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>javaME 綰夸笌寮у艦http://www.aygfsteel.com/yanyan/archive/2009/12/01/304422.htmljavazjavazTue, 01 Dec 2009 12:01:00 GMThttp://www.aygfsteel.com/yanyan/archive/2009/12/01/304422.htmlhttp://www.aygfsteel.com/yanyan/comments/304422.htmlhttp://www.aygfsteel.com/yanyan/archive/2009/12/01/304422.html#Feedback0http://www.aygfsteel.com/yanyan/comments/commentRss/304422.htmlhttp://www.aygfsteel.com/yanyan/services/trackbacks/304422.html 

import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;


public class GraphicsTest extends MIDlet{
  private Display display;

    public GraphicsTest() {
        display=Display.getDisplay(this);

    }
 
    protected void destroyApp(boolean unconditional)  {
     
       
    }

    protected void pauseApp() {
       
    }

    protected void startApp(){
     MyCanvas mc=new MyCanvas();
     display.setCurrent(mc);
    }


}
class MyCanvas extends Canvas {

    public void paint(Graphics g){
     int width=getWidth();
     int height=getHeight();
    
     g.setColor(0);
     g.fillRect(0, 0, width, height);
    
     int a=width/5;
     int b=height/5;
     g.setColor(0Xffff00);
     for(int i=1;i<=4;i++){
     g.drawLine(a,0 ,a,height);
     g.drawLine( 0,b,  width,b);
     a=a+width/5;
     b=b+height/5;
    
     } g.drawArc(0, 0, width, height, 0, 360);
    }

}

 



javaz 2009-12-01 20:01 鍙戣〃璇勮
]]>
榛戝睆鐧藉瓧 SimpleCanvashttp://www.aygfsteel.com/yanyan/archive/2009/11/26/303804.htmljavazjavazThu, 26 Nov 2009 12:06:00 GMThttp://www.aygfsteel.com/yanyan/archive/2009/11/26/303804.htmlhttp://www.aygfsteel.com/yanyan/comments/303804.htmlhttp://www.aygfsteel.com/yanyan/archive/2009/11/26/303804.html#Feedback0http://www.aygfsteel.com/yanyan/comments/commentRss/303804.htmlhttp://www.aygfsteel.com/yanyan/services/trackbacks/303804.html
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;


public class SimpleCanvas extends MIDlet{
  private Display display;

    public SimpleCanvas() {
        display=Display.getDisplay(this);

    }
 
    protected void destroyApp(boolean unconditional)  {
     
       
    }

    protected void pauseApp() {
       
    }

    protected void startApp(){
     MyCanvas mc=new MyCanvas();
     display.setCurrent(mc);
    }


}
class MyCanvas extends Canvas {

    public void paint(Graphics g){
      g.setColor(0,0,0);
      g.fillRect(0,0,getWidth(),getHeight());
      g.setColor(255, 255,255);
      g.drawString("浣犲ソ,嫻嬭瘯", 100, 100, 0);
    }

}



javaz 2009-11-26 20:06 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 阿图什市| 赞皇县| 临邑县| 西安市| 光山县| 华安县| 广南县| 东辽县| 宁都县| 叙永县| 东乡| 元氏县| 荃湾区| 基隆市| 隆昌县| 临泽县| 昌都县| 名山县| 德庆县| 镇原县| 南召县| 扬中市| 景泰县| 从江县| 乐清市| 青河县| 江西省| 同德县| 台州市| 永胜县| 双江| 鄂州市| 祥云县| 台北市| 鄂伦春自治旗| 寿阳县| 武穴市| 郓城县| 仁化县| 儋州市| 普安县|