天行健
《周易》曰:
天行健,君子以自強(qiáng)不息(乾卦)
地勢(shì)坤,君子以厚德載物(坤卦)
導(dǎo)航
BlogJava
首頁(yè)
新隨筆
聯(lián)系
聚合
管理
統(tǒng)計(jì)
隨筆 - 119
文章 - 4
評(píng)論 - 92
引用 - 0
公告
對(duì)家人好點(diǎn),對(duì)朋友好點(diǎn),對(duì)自己好點(diǎn)
bnlovebn@21cn.com
常用鏈接
我的隨筆
我的評(píng)論
我的參與
最新評(píng)論
留言簿
(5)
給我留言
查看公開留言
查看私人留言
隨筆分類
AJAX(2)
(rss)
DataBase(18)
(rss)
Hibernate(6)
(rss)
JAVA (24)
(rss)
JS(11)
(rss)
JSP(18)
(rss)
linux(5)
(rss)
SOA(1)
(rss)
Spring(7)
(rss)
Struts(6)
(rss)
webserver(2)
(rss)
WML(1)
(rss)
其它(25)
(rss)
系統(tǒng)設(shè)計(jì)(5)
(rss)
隨筆檔案
2011年6月 (3)
2010年4月 (1)
2008年12月 (1)
2008年9月 (2)
2008年6月 (4)
2008年5月 (8)
2008年4月 (3)
2008年3月 (5)
2007年11月 (5)
2007年10月 (2)
2007年9月 (1)
2007年7月 (15)
2007年6月 (3)
2007年5月 (8)
2007年4月 (3)
2007年3月 (1)
2007年2月 (6)
2007年1月 (5)
2006年12月 (15)
2006年11月 (5)
2006年10月 (3)
2006年9月 (3)
2006年7月 (2)
2006年6月 (14)
2006年4月 (1)
文章分類
JAVA文章(3)
(rss)
JSP文章
(rss)
其它(1)
(rss)
技術(shù)文章
(rss)
文章檔案
2011年6月 (1)
2006年9月 (1)
2006年6月 (1)
2006年4月 (1)
搜索
最新評(píng)論
1.?re: 無(wú)法使用此產(chǎn)品的安裝源,請(qǐng)確認(rèn)安裝源存在,并且您可以訪問(wèn)它
兩種方法都用了,都不行呀
--龍
2.?re: 系統(tǒng)啟動(dòng)時(shí)出現(xiàn)錯(cuò)誤:應(yīng)用程序-特定 權(quán)限設(shè)置未將 COM 服務(wù)器應(yīng)用程序(CLSID 為 {BA126AD1-2166-11D1-B1D0-00805FC1270E})的 本地 激活 權(quán)限授予用戶 NT AUTHORITY\NETWORK SERVICE 的解決.
DCOM
--dacan
3.?re: 關(guān)于Myeclipse configuration center中software中的personal sites中添加的插件無(wú)法刪除的解決
刪除 add site history :
D:\Genuitec是安裝目錄
D:\Genuitec\Common\configuration\bookmark.properties
--g_man1990
4.?re: Cannot find bean under name org.apache.struts.taglib.html.BEAN[轉(zhuǎn)][未登錄]
多謝
--zw
5.?re: 解決JS頁(yè)面跳轉(zhuǎn)ie,firefox,opera不兼容問(wèn)題[未登錄]
在opera還是不能跳轉(zhuǎn)
--vincent
閱讀排行榜
1.?Hibernate SQL方言 (hibernate.dialect)(49473)
2.?幾種js實(shí)現(xiàn)的動(dòng)態(tài)多文件上傳(32297)
3.?java創(chuàng)建文件夾,文件;刪除文件夾,文件(30133)
4.?無(wú)法使用此產(chǎn)品的安裝源,請(qǐng)確認(rèn)安裝源存在,并且您可以訪問(wèn)它(30073)
5.?js截取字符串的方法(19759)
評(píng)論排行榜
1.?[linux]警告:檢測(cè)到時(shí)鐘錯(cuò)誤。您的創(chuàng)建可能是不完整的。(13)
2.?無(wú)法使用此產(chǎn)品的安裝源,請(qǐng)確認(rèn)安裝源存在,并且您可以訪問(wèn)它(13)
3.?幾種js實(shí)現(xiàn)的動(dòng)態(tài)多文件上傳(12)
4.?Cannot find bean under name org.apache.struts.taglib.html.BEAN[轉(zhuǎn)](7)
5.?在用MyEclipse發(fā)布應(yīng)用,構(gòu)建路徑的問(wèn)題(7)
一個(gè)JProgressBar的簡(jiǎn)單例子
?
?
?1
import
?javax.swing.
*
;
?2
import
?java.awt.
*
;
?3
import
?java.awt.event.
*
;
?4
import
?javax.swing.event.
*
;
?5
import
?javax.swing.border.
*
;
?6
?7
?8
public
?
class
?JProgressEx?
extends
?JApplet
{
?9
?
private
?
int
?min
=
0
,max
=
100
;
10
??
private
?JProgressBar?pb?
=
?
new
?JProgressBar();
11
?
private
?Timer?t;
12
??
private
?
int
?i;
13
???JPanel?panel?
=
?
new
?JPanel();
14
??
public
?JProgressEx()
{
15
??}
16
??
public
?
synchronized
?
void
?setValue()
{
17
???i
=
0
;
18
??}
19
??
public
?
synchronized
?
int
?getValue()
{
20
???
return
?i;
21
??}
22
??
public
?
synchronized
?
void
?addValue()
{
23
???i
++
;
24
??}
25
??
public
?
void
?setMin()
{
26
???
this
.min?
=
?min;
27
??}
28
??
public
?
int
?getMin()
{
29
???
return
?min;
30
??}
31
??
public
?
void
?setMax()
{
32
???
this
.max?
=
?max;
33
??}
34
??
public
?
int
?getMax()
{
35
???
return
?max;
36
??}
37
38
?
public
?
void
?init()?
{
39
????Container?cp?
=
?getContentPane();
40
????pb.setMinimum(min);
41
????pb.setMaximum(max);
42
????pb.setBackground?(Color.white);
43
????pb.setForeground?(Color.red);
44
????pb.setStringPainted(
true
)?;
45
????cp.add(panel.add(pb),BorderLayout.PAGE_START);
46
??}
47
??
public
?
void
?start()
{
48
???t?
=
?
new
?Timer(
100
,?
new
?ActionListener()?
{
49
??????
public
?
void
?actionPerformed(ActionEvent?evt)?
{
50
????????
if
(getValue()
<
getMax())
{
51
??????????addValue();
52
??????????pb.setValue(getValue());
53
????????}
else
{
54
??????????setValue();
55
??????????t.stop();
56
????????}
57
????}
58
????}
);
59
??t.start();
60
??}
61
??
public
?
static
?
void
?main(String[]?args)?
{
62
??
final
?JProgressEx?pg?
=
?
new
??JProgressEx();
63
????JFrame?frame?
=
?
new
?JFrame(
"
JProgressEx
"
);
64
????frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
65
????frame.getContentPane().add(pg);
66
????frame.setSize(
300
,?
200
);
67
????pg.init();
68
????frame.setVisible(
true
);
69
????pg.start();
70
??}
71
}
72
?
?7
?8
public
?
class
?JProgressEx?
extends
?JApplet
{
?9
?
private
?
int
?min
=
0
,max
=
100
;
10
??
private
?JProgressBar?pb?
=
?
new
?JProgressBar();
11
?
private
?Timer?t;
12
??
private
?
int
?i;
13
???JPanel?panel?
=
?
new
?JPanel();
14
??
public
?JProgressEx()
{
15
??}
16
??
public
?
synchronized
?
void
?setValue()
{
17
???i
=
0
;
18
??}
19
??
public
?
synchronized
?
int
?getValue()
{
20
???
return
?i;
21
??}
22
??
public
?
synchronized
?
void
?addValue()
{
23
???i
++
;
24
??}
25
??
public
?
void
?setMin()
{
26
???
this
.min?
=
?min;
27
??}
28
??
public
?
int
?getMin()
{
29
???
return
?min;
30
??}
31
??
public
?
void
?setMax()
{
32
???
this
.max?
=
?max;
33
??}
34
??
public
?
int
?getMax()
{
35
???
return
?max;
36
??}
37
38
?
public
?
void
?init()?
{
39
????Container?cp?
=
?getContentPane();
40
????pb.setMinimum(min);
41
????pb.setMaximum(max);
42
????pb.setBackground?(Color.white);
43
????pb.setForeground?(Color.red);
44
????pb.setStringPainted(
true
)?;
45
????cp.add(panel.add(pb),BorderLayout.PAGE_START);
46
??}
47
??
public
?
void
?start()
{
48
???t?
=
?
new
?Timer(
100
,?
new
?ActionListener()?
{
49
??????
public
?
void
?actionPerformed(ActionEvent?evt)?
{
50
????????
if
(getValue()
<
getMax())
{
51
??????????addValue();
52
??????????pb.setValue(getValue());
53
????????}
else
{
54
??????????setValue();
55
??????????t.stop();
56
????????}
57
????}
58
????}
);
59
??t.start();
60
??}
61
??
public
?
static
?
void
?main(String[]?args)?
{
62
??
final
?JProgressEx?pg?
=
?
new
??JProgressEx();
63
????JFrame?frame?
=
?
new
?JFrame(
"
JProgressEx
"
);
64
????frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
65
????frame.getContentPane().add(pg);
66
????frame.setSize(
300
,?
200
);
67
????pg.init();
68
????frame.setVisible(
true
);
69
????pg.start();
70
??}
71
}
72
?
posted on 2006-04-10 17:25
重歸本壘(Bing)
閱讀(3715)
評(píng)論(1)
編輯
收藏
所屬分類:
JAVA文章
Comments
#
re: 一個(gè)JProgressBar的簡(jiǎn)單例子
老歐
謝謝,正需要
Posted @ 2008-11-27 20:47
回復(fù)
更多評(píng)論
新用戶注冊(cè)
刷新評(píng)論列表
只有注冊(cè)用戶
登錄
后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問(wèn)
管理
相關(guān)文章:
項(xiàng)目中成功的運(yùn)用proxool連接池
在繼承中的成員變量好像不會(huì)向下轉(zhuǎn)型的
一個(gè)JProgressBar的簡(jiǎn)單例子
Powered by:
BlogJava
Copyright © 重歸本壘(Bing)
主站蜘蛛池模板:
国产亚洲成AV人片在线观黄桃
|
无码不卡亚洲成?人片
|
在线免费观看一级毛片
|
免费黄色毛片视频
|
一区二区三区亚洲视频
|
国产亚洲精久久久久久无码77777
|
亚洲AV无码一区二区三区系列
|
亚洲激情电影在线
|
亚洲av日韩av永久无码电影
|
久久国产一片免费观看
|
67194成手机免费观看
|
在线播放免费人成视频在线观看
|
亚洲成aⅴ人片久青草影院
|
婷婷精品国产亚洲AV麻豆不片
|
久久精品成人免费观看97
|
91精品国产免费网站
|
午夜视频免费成人
|
国产亚洲人成A在线V网站
|
亚洲的天堂av无码
|
国产亚洲精品2021自在线
|
久久国产精品免费观看
|
日韩一品在线播放视频一品免费
|
国产亚洲视频在线播放
|
亚洲成A∨人片在线观看无码
|
国产亚洲精品2021自在线
|
日韩精品无码专区免费播放
|
国产a级特黄的片子视频免费
|
亚洲av永久无码精品国产精品
|
99久久国产亚洲综合精品
|
精品人妻系列无码人妻免费视频
|
热99re久久精品精品免费
|
亚洲精品高清无码视频
|
国产亚洲精品成人AA片
|
国产在线观看免费av站
|
毛片在线免费视频
|
亚洲国产精品一区第二页
|
一区二区视频免费观看
|
一本岛高清v不卡免费一三区
|
亚洲人JIZZ日本人
|
亚洲av无码一区二区三区在线播放
|
久久免费区一区二区三波多野
|