Sfoglia il codice sorgente

修复定时器错误。

YangZhiJie 8 anni fa
parent
commit
1125c3a554

+ 5 - 3
src/main/java/com/leanwo/management/ServerManagmentJFrame.java

@@ -73,7 +73,7 @@ public class ServerManagmentJFrame extends JFrame implements ActionListener {
 	private int windowsHeight = 400;
 
 	private JPanel jPanel = null;
-	private Timer timer;
+	//private Timer timer;
 
 	private TrayIcon trayIcon;				// 托盘图标
 	private SystemTray systemTray;	// 系统托盘
@@ -101,8 +101,8 @@ public class ServerManagmentJFrame extends JFrame implements ActionListener {
 		
 		this.setVisible(true); // 显示,如果不设置就什么都看不到
 		
-		timer = new Timer(1000,this);
-		timer.start();
+		//timer = new Timer(1000,this);
+		//timer.start();
 		
 		// 判断当前平台是否支持系统托盘
 		if(SystemTray.isSupported()) {
@@ -403,6 +403,7 @@ public class ServerManagmentJFrame extends JFrame implements ActionListener {
 				}
 				
 				// 监控各个服务程序是否正在运行
+				/**
 				String url = setting.getMonitorUrl();
 				String token = setting.getToken();
 				if(url == null || "".equals(url) || token == null || "".equals(token)){
@@ -429,6 +430,7 @@ public class ServerManagmentJFrame extends JFrame implements ActionListener {
 						statusLabel.setText("已停止");
 					}
 				}
+				*/
 			}
 		}
 	}

+ 0 - 2
src/main/java/org/leanwo/management/ServerManagementApp.java

@@ -17,8 +17,6 @@ public class ServerManagementApp {
 	
 	private static Log logger = LogFactory.getLog(ServerManagmentJFrame.class);
 
-	
-	
 	public static void main(String[] args) {
 		//ProgramStartUtil.generateStartBat();
 		ProgramAutoStartUtil.generateStartBat();