亚洲中文字幕精品久久,亚洲色图国产精品,亚洲精品专区在线观看http://www.tkk7.com/asdtiang/category/43554.html交流學(xué)習(xí)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遇到的一些常見問題:

模擬器一閃而過,出現(xiàn)classnotfound異常

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


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

控件只出現(xiàn)次數(shù)少的,可以按以下代碼實現(xiàn)定位

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();

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

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

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

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

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

List顯示問題,程序?qū)懗鰜戆l(fā)現(xiàn)在list過長時,不會滾動,下面的內(nèi)容全部無法查看。經(jīng)查看原demo發(fā)現(xiàn)需要設(shè)置form.setScrollable(false);因為當(dāng)加進(jìn)form里時,整個list被視為一個控件,而在默認(rèn)情況下form.setScrollable(true),在這種情況下,界面內(nèi)容過長時會自動滾動,但是它是靠移動焦點來滾動的。而整個list這種情況下只占一個焦點所以不能滾動。

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

轉(zhuǎn)載注明出處:j2me 交流群:65676039 ----逐夢



asdtiang 2010-01-12 18:57 發(fā)表評論
]]>
利用SMSLib通過COM來發(fā)短信(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導(dǎo)入引用包中,javax.comm.properties拷貝到JDKDIR/jre/lib/下,win32com.dll拷貝到 JDKDIR/jre/bin/下



第二步:
把相應(yīng)的包導(dǎo)入就可以了。

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

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 發(fā)表評論
]]>
java利用SMSLib通過COM發(fā)送短信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導(dǎo)入引用包中,javax.comm.properties拷貝到JDKDIR/jre/lib/下,win32com.dll拷貝到 JDKDIR/jre/bin/下



第二步:
把相應(yīng)的包導(dǎo)入就可以了。

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

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

asdtiang 2010-01-12 18:05 發(fā)表評論
]]>
主站蜘蛛池模板: 亚洲人配人种jizz| 91天堂素人精品系列全集亚洲| 久久亚洲中文字幕精品有坂深雪 | 456亚洲人成影院在线观| 久久久久国产免费| 久久精品国产亚洲AV麻豆王友容 | 久久久久国产免费| 亚洲黄色网址大全| 综合在线免费视频| 中文字幕亚洲综合小综合在线| 青青在线久青草免费观看| 亚洲youjizz| 日韩免费毛片视频| 国产亚洲日韩在线a不卡| 全亚洲最新黄色特级网站 | 999zyz**站免费毛片| 亚洲色婷婷六月亚洲婷婷6月 | 亚洲精品无码一区二区| baoyu122.永久免费视频| 亚洲精品无码午夜福利中文字幕 | 国产亚洲美女精品久久久2020 | 国产中文在线亚洲精品官网| 两个人日本WWW免费版| 亚洲成Av人片乱码色午夜| 日韩在线不卡免费视频一区| 免费a级黄色毛片| 国产精品美女免费视频观看| 亚洲av永久无码制服河南实里| 免费无码成人AV在线播放不卡| 亚洲黄色三级视频| 免费观看的毛片手机视频| 真正全免费视频a毛片| 亚洲香蕉成人AV网站在线观看| 久久99精品国产免费观看| 亚洲国产精品综合久久20| 免费很黄很色裸乳在线观看| 国产在线精品一区免费香蕉| 亚洲国产午夜精品理论片| 免费在线精品视频| 在线免费观看亚洲| 另类专区另类专区亚洲|