java后台程序实现大量繁琐的数据库更新操作,需要执行大约2分钟的时间,我想在页面加一个进度条,如何设计?
这些更新操作全在一个while循环里边执行,如:
while(urlreader.read() > 0){
String str = urlreader.readLine();
while(matcher.contains(str, pattern2)){ MatchResult result = matcher.getMatch();
String sql1 = "insert into price ("+sql+"data, url) values ('"+result.group(1)+"','"+result.group(2)+"','"+result.group(3)+"','"+data+"','"+website+"')"; System.out.println(sql1);
System.out.println("正在insert into price数据...");
try{
stmt.execute(sql1);count++; sqlcount++;
}catch(SQLException sqle){
System.out.println("数据库插入失败!");
System.exit(1);
}
}}怎么实现这个进度条?
邮箱:[email protected]  达人指教了