| | |
| | | package com.example.client; |
| | | |
| | | import com.example.client.service.*; |
| | | import com.example.server.utils.NumToDate; |
| | | import com.teamdev.jxbrowser.chromium.*; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class Main extends JFrame implements MouseListener { |
| | | @Autowired |
| | | private SetUIFontService setUIFontService; |
| | | @Autowired |
| | | private NumToDate numToDate; |
| | | @Autowired |
| | | private MenuService treeServise; |
| | | private final JPopupMenu menu = new JPopupMenu(); |
| | |
| | | } |
| | | |
| | | public void Start(Integer role, Long userId) throws HeadlessException { |
| | | final java.util.concurrent.ExecutorService executor = java.util.concurrent.Executors.newSingleThreadExecutor(r -> { |
| | | Thread t = new Thread(r, "numToDate-thread"); |
| | | t.setDaemon(true); |
| | | return t; |
| | | }); |
| | | executor.submit(() -> { |
| | | try { |
| | | numToDate.numDate(); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } finally { |
| | | executor.shutdown(); |
| | | } |
| | | }); |
| | | //获取屏幕宽高 |
| | | GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); |
| | | Rectangle rect = ge.getMaximumWindowBounds(); |