public void clickAction(){
JTextField hours = new JTextField();
JTextField minutes = new JTextField();
JTextField seconds = new JTextField();
Object[] message = {
"Hours", hours,
"Minutes", minutes,
"Seconds",seconds
};
int option = JOptionPane.showConfirmDialog(null, message, "Time Limit", JOptionPane.OK_CANCEL_OPTION);
if (option == JOptionPane.OK_OPTION) {
try{
w.setTimeLimit(Integer.parseInt(hours.getText()),
Integer.parseInt(minutes.getText()),
Integer.parseInt(seconds.getText()),0);
}catch(Exception e){
w.setTimeLimit(Integer.MAX_VALUE,Integer.MAX_VALUE,Integer.MAX_VALUE,Integer.MAX_VALUE);
}
}
}
TimeLimit.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:GOLAD
作者:
评论列表
文章目录