public StatusBar() {
super();
this.setBackground(Color.WHITE);
terminateTask = new JButton("Stop");
label = new JLabel();
label1 = new JLabel("Status ");
progressBar = new JProgressBar();
progressBar.setMinimum(50);
progressBar.setMaximum(100);
add(label1);
add(progressBar);
add(label);
add(terminateTask);
setMessage("Ready");
terminateTask.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if(currentTask == null)
return;
currentTask.cancel(true);
setMessage("Task canceled");
terminateTask.setEnabled(false);
}
});
}
StatusBar.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:cuttlefish
作者:
评论列表
文章目录