久久噜噜噜久久亚洲va久,亚洲av午夜成人片精品电影,亚洲av一本岛在线播放http://www.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://www.tkk7.com/asdtiang/articles/309219.htmlasdtiangasdtiangTue, 12 Jan 2010 10:57:00 GMThttp://www.tkk7.com/asdtiang/articles/309219.htmlhttp://www.tkk7.com/asdtiang/comments/309219.htmlhttp://www.tkk7.com/asdtiang/articles/309219.html#Feedback0http://www.tkk7.com/asdtiang/comments/commentRss/309219.htmlhttp://www.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://www.tkk7.com/asdtiang/articles/309211.htmlasdtiangasdtiangTue, 12 Jan 2010 10:07:00 GMThttp://www.tkk7.com/asdtiang/articles/309211.htmlhttp://www.tkk7.com/asdtiang/comments/309211.htmlhttp://www.tkk7.com/asdtiang/articles/309211.html#Feedback0http://www.tkk7.com/asdtiang/comments/commentRss/309211.htmlhttp://www.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://www.tkk7.com/asdtiang/articles/309209.htmlasdtiangasdtiangTue, 12 Jan 2010 10:05:00 GMThttp://www.tkk7.com/asdtiang/articles/309209.htmlhttp://www.tkk7.com/asdtiang/comments/309209.htmlhttp://www.tkk7.com/asdtiang/articles/309209.html#Feedback0http://www.tkk7.com/asdtiang/comments/commentRss/309209.htmlhttp://www.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 發表評論
]]>
主站蜘蛛池模板: 亚洲成AV人片在| 久久亚洲欧洲国产综合| 亚洲精品私拍国产福利在线| 久久WWW免费人成—看片| 亚洲一区精品伊人久久伊人| 一级做a爱过程免费视| 免费在线观看黄色毛片| 麻豆一区二区三区蜜桃免费| 免费jjzz在线播放国产| 一级毛片试看60分钟免费播放| 亚洲黄黄黄网站在线观看| 国产精品福利在线观看免费不卡| 亚洲男女内射在线播放| a视频在线观看免费| 亚洲毛片基地日韩毛片基地| 国产精品免费网站| 亚洲中文字幕乱码熟女在线| 69成人免费视频无码专区| 亚洲综合一区无码精品| 青青草国产免费久久久91| 久久亚洲国产最新网站| 亚洲免费在线视频| 亚洲成色www久久网站夜月| 高清永久免费观看| 亚洲色精品88色婷婷七月丁香| 亚洲丰满熟女一区二区哦| 妞干网手机免费视频| 日本亚洲免费无线码| 国产精品免费看久久久无码| 美女被爆羞羞网站在免费观看| 免费v片在线观看无遮挡| 一区二区视频免费观看| 亚洲理论电影在线观看| 国产成人精品无码免费看| 亚洲综合色丁香麻豆| 成人免费一区二区无码视频| 午夜在线免费视频| 7777久久亚洲中文字幕蜜桃| 国产日产成人免费视频在线观看 | 色偷偷亚洲第一综合| 日本黄页网站免费|