久久噜噜噜久久亚洲va久,亚洲av午夜成人片精品电影,亚洲av一本岛在线播放http://m.tkk7.com/asdtiang/category/43554.html交流學習JAVA zh-cnThu, 14 Jan 2010 04:10:21 GMTThu, 14 Jan 2010 04:10:21 GMT60eclipse使用LWUIT時報錯java.lang.NoClassDefFoundError解決方法http://m.tkk7.com/asdtiang/articles/309219.htmlasdtiangasdtiangTue, 12 Jan 2010 10:57:00 GMThttp://m.tkk7.com/asdtiang/articles/309219.htmlhttp://m.tkk7.com/asdtiang/comments/309219.htmlhttp://m.tkk7.com/asdtiang/articles/309219.html#Feedback0http://m.tkk7.com/asdtiang/comments/commentRss/309219.htmlhttp://m.tkk7.com/asdtiang/services/trackbacks/309219.html

使用lwui遇到的一些常見問題:

模擬器一閃而過,出現classnotfound異常

一般可能是因為開發環境不兼容問題,建議采用Eclicpse 3.4、JDK1.6、插件EclicpseMe1.7.9、模擬器:WTK2.5.2相搭配。別一種可能是因為引入的lwuit沒有置頂的關系,只是按下圖操作配置一下就可以了。


如何裝控件居中,控件定位問題

控件只出現次數少的,可以按以下代碼實現定位

f = new Form("Form");

f.setLayout(new BoxLayout(BoxLayout.Y_AXIS));

bt_reset=new Button("重置");      

bt_reset.setPreferredW(50);

Container csubmission = new Container(new FlowLayout(Component.CENTER));

csubmission.addComponent(bt_reset);

f.addComponent(csubmission);

        f.show();

出現次數較多的話最好自己寫一個控件出來,不然會比較消耗資源。

文本域顯示文字不全,每一行最后幾個字看不到的問題

這個問題,只會在一部分機型是出現,像winmobile系統的手機一般沒有問題,但Symbian系列的上面會有文字顯示不全的問題。這個問題我采用了很我多種方法去解決,都不見成效,迫不得已查看源碼,結果真是因為那邊的問題,lwuit原本就沒有漢化,所以計算文字的長度時是把一個字當一個字母來計算的,英文字母的長度比中文的小,所以每一行里的文字字數按照它的計算會比現實多幾個。

解決方案:將源碼里面被用來計算文字長度的英文字母改成中文。

list過長,下面的項顯示不出來?

List顯示問題,程序寫出來發現在list過長時,不會滾動,下面的內容全部無法查看。經查看原demo發現需要設置form.setScrollable(false);因為當加進form里時,整個list被視為一個控件,而在默認情況下form.setScrollable(true),在這種情況下,界面內容過長時會自動滾動,但是它是靠移動焦點來滾動的。而整個list這種情況下只占一個焦點所以不能滾動。

解決方案:form.setScrollable(false);

轉載注明出處:j2me 交流群:65676039 ----逐夢



asdtiang 2010-01-12 18:57 發表評論
]]>
利用SMSLib通過COM來發短信(JAR包及配置) XMLhttp://m.tkk7.com/asdtiang/articles/309211.htmlasdtiangasdtiangTue, 12 Jan 2010 10:07:00 GMThttp://m.tkk7.com/asdtiang/articles/309211.htmlhttp://m.tkk7.com/asdtiang/comments/309211.htmlhttp://m.tkk7.com/asdtiang/articles/309211.html#Feedback0http://m.tkk7.com/asdtiang/comments/commentRss/309211.htmlhttp://m.tkk7.com/asdtiang/services/trackbacks/309211.html第一步:
The installation procedure for both the old Java Comm v2 and the new Java Comm v3 is identical.

Java Comm v2 is for Win32 systems and it is available on the Download page.

Java Comm v3 is for Linux systems and it is available for download directly from SUN downloads (registration is required)

To install it, unzip the downloaded archive file in a temporary place and do the following copies:

File comm.jar should go under JDKDIR/jre/lib/ext/
File javax.comm.properties should go under JDKDIR/jre/lib/
Library files (i.e. win32com.dll for Win32 or the .so Linux library files) should go under JDKDIR/jre/bin/
If you have a separate JRE directory, do the same copies for the JREDIR directory!

即comm.jar導入引用包中,javax.comm.properties拷貝到JDKDIR/jre/lib/下,win32com.dll拷貝到 JDKDIR/jre/bin/下



第二步:
把相應的包導入就可以了。

當時在做的時候,發現通過SMSLib發送程序還是比較麻煩的,他的日志采用的是slf4j,而slf4j是基于log4j的,這幾個不同的JAR包都是 在不同的地方下載的,在此所有的JAR整理出來,希望大家節約時間

JAR包下載地址http://www.ziddu.com/download/7798641/phonesendmessageJAR.rar.html


測試源碼:
package org.asdtiang.phone.sendMessage;

import org.smslib.IOutboundMessageNotification;
import org.smslib.Message.MessageEncodings;
import org.smslib.OutboundMessage;
import org.smslib.modem.SerialModemGateway;

public class Main {
private static org.smslib.Service srv = new org.smslib.Service();;

public static void creatService() {
SerialModemGateway gateway 
= new SerialModemGateway("SMS""COM3",
9600"LENOVO""6070");
gateway.setInbound(
true);
gateway.setOutbound(
true);
try {
srv.addGateway(gateway);
srv.startService();
System.out.println(
"Modem connected.");
sendSms(
"15100164985""測試用");
catch (Exception ex) {
ex.printStackTrace();
}
}

public static org.smslib.Service getService() {
if (srv == null) {
creatService();
}
return srv;
}

public static void disconnect() {
try {
// srv.disconnect();

System.out.println(
"Modem disconnected.");
catch (Exception ex) {
ex.printStackTrace();
}

}

public static void main(String args[]) {
creatService();
}

public static boolean sendSms(String mobile, String content) {
OutboundMessage msg 
= new OutboundMessage(mobile, content);
msg.setEncoding(MessageEncodings.ENCUCS2);
try {
srv.sendMessage(msg);
System.out.println(msg);
catch (Exception ex) {
// log.error(ex);
return false;
}
return true;
}

public void close() {
try {
srv.stopService();
catch (Exception ex) {
// log.error(ex);
}
}

public class OutboundNotification implements IOutboundMessageNotification {
public void process(String gatewayId, OutboundMessage msg) {
System.out.println(
"Outbound handler called from Gateway: "
+ gatewayId);
System.out.println(msg);
}
}
}



asdtiang 2010-01-12 18:07 發表評論
]]>
java利用SMSLib通過COM發送短信JAR包http://m.tkk7.com/asdtiang/articles/309209.htmlasdtiangasdtiangTue, 12 Jan 2010 10:05:00 GMThttp://m.tkk7.com/asdtiang/articles/309209.htmlhttp://m.tkk7.com/asdtiang/comments/309209.htmlhttp://m.tkk7.com/asdtiang/articles/309209.html#Feedback0http://m.tkk7.com/asdtiang/comments/commentRss/309209.htmlhttp://m.tkk7.com/asdtiang/services/trackbacks/309209.html The installation procedure for both the old Java Comm v2 and the new Java Comm v3 is identical.

Java Comm v2 is for Win32 systems and it is available on the Download page.

Java Comm v3 is for Linux systems and it is available for download directly from SUN downloads (registration is required)

To install it, unzip the downloaded archive file in a temporary place and do the following copies:

File comm.jar should go under JDKDIR/jre/lib/ext/
File javax.comm.properties should go under JDKDIR/jre/lib/
Library files (i.e. win32com.dll for Win32 or the .so Linux library files) should go under JDKDIR/jre/bin/
If you have a separate JRE directory, do the same copies for the JREDIR directory!

即comm.jar導入引用包中,javax.comm.properties拷貝到JDKDIR/jre/lib/下,win32com.dll拷貝到 JDKDIR/jre/bin/下



第二步:
把相應的包導入就可以了。

當時在做的時候,發現通過SMSLib發送程序還是比較麻煩的,他的日志采用的是slf4j,而slf4j是基于log4j的,這幾個不同的JAR包都是 在不同的地方下載的,在此所有的JAR整理出來,希望大家節約時間

包下載地址:http://download.csdn.net/source/1910091

asdtiang 2010-01-12 18:05 發表評論
]]>
主站蜘蛛池模板: 亚洲中文字幕丝袜制服一区| 国产va免费精品观看精品| 日韩一区二区在线免费观看| 亚洲a∨无码男人的天堂| 黄色网址免费观看| 在线综合亚洲中文精品| 免费99精品国产自在现线| 亚洲人成高清在线播放| 欧美男同gv免费网站观看 | 免费的黄色的网站| 亚洲国产精品成人一区| 香蕉免费看一区二区三区| 亚洲成A∨人片在线观看不卡| 全部免费毛片在线播放| 亚洲综合免费视频| 毛片免费在线视频| 特级毛片aaaa免费观看| 亚洲乱码无码永久不卡在线| 中文字幕亚洲免费无线观看日本 | 免费观看毛片视频| 男男gay做爽爽免费视频| 亚洲色无码专区在线观看| 午夜精品射精入后重之免费观看 | 爱情岛论坛亚洲品质自拍视频网站| 国产在线不卡免费播放| 97在线免费视频| 亚洲经典在线中文字幕| 日本一道在线日本一道高清不卡免费| 一进一出60分钟免费视频| 午夜影视日本亚洲欧洲精品一区 | 亚洲AV日韩精品一区二区三区| A级毛片成人网站免费看| 亚洲精品视频久久| 啊灬啊灬别停啊灬用力啊免费看| 成人免费777777被爆出| 亚洲国产中文在线视频| 中文字幕亚洲日韩无线码| 999在线视频精品免费播放观看| 国产成人亚洲毛片| 78成人精品电影在线播放日韩精品电影一区亚洲 | 亚洲无码一区二区三区|