dポイントプレゼントキャンペーン実施中!

こんばんは。

iAppliJAVAについて教えてください。

ボタンを押されて次の画面を表示するまでの間に
ダイアログボックスで「処理中」というのを表示させたいのですが、スレッド処理とかでできるのでしょうか?

処理中の間だけ表示させて、終わったら閉じて次の画面を表示・・・という感じです。

A 回答 (1件)

こんばんは。


スレッド処理はできますが、DoJa標準のダイアログはユーザーイベント以外では消せないと思うので、ダイアログは自作する必要がありそうです。
スレッド処理はJ2SEと同じです。
- - - - - - - - - - - - - - -
import com.nttdocomo.ui.*;
public class Test extends IApplication implements Runnable {
int x = 1000000;
Panel p2;
public void start() {
Panel p = new Panel();
Label l = new Label("処理中...");
p.add(l);

p2 = new Panel();
Label l2 = new Label("完了");
p2.add(l2);

Display.setCurrent(p);

Thread t = new Thread(this);
t.start();
}

public void run() {
for(int i = 0; i < x; i++) {
shori();
}
Display.setCurrent(p2);
}

public void shori() {
int y = x / 9 * 8 / 7 * 6 / 5 * 4 / 3 * 2;
y = ((x % (x / 10)) % (x / 20)) % (x / 30);
}
}
    • good
    • 0
この回答へのお礼

どうもありがとうございました!!

お礼日時:2005/09/12 10:10

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!