0
我在一個文件夾中有幾個大的數據庫文件,我用JAVA處理它們一段時間後,如何使用JProgressbar顯示剩餘時間百分比?用jprogressbar顯示剩餘時間?
public int countTrueAmr(String text, String under,String value, String search) {
int sLen = under.length();
int count = 0;
int index = text.indexOf(under + value, 0);
int nextIndex = text.indexOf(under, index + sLen);
while (index > 0 && nextIndex > 0) {
count += countString(text.substring(index, nextIndex), search);
index = text.indexOf(under + value, index + sLen);
nextIndex = text.indexOf(under, index + sLen);
if (nextIndex < 0)
nextIndex = text.length();
}
return count;
}
非常感謝......
可否請給我一個例子?謝謝 – Freeman
請參閱教程:http://download.oracle.com/javase/tutorial/uiswing/components/progress.html – wannik
感謝您的幫助...... :) – Freeman