Update JProgressBar from ExecutorService

I am pinging gateways using Java ICMP ping function. To perform fast pinging I am using ExectorService which creates threads for pinging. After address is pinged (or not) I want to update Jprogressbar after pinging. I have this code which is working but it updates Jprogressbar before job (ping thread) is finished. I want to update jprogressbar after job is finished. private int NUM_THREADS = Runtime.getRuntime().availableProcessors(); ExecutorService exec = Executors.newFixedThreadPool(NUM_THREADS); public void run() { int JProgressBarValue = 0; for (;GateWayKey

以上就是Update JProgressBar from ExecutorService的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准