📄 main.java
字号:
package fr.umlv.projet.fenetre.preformance;import java.awt.BorderLayout;import java.awt.Color;import java.util.ArrayList;import java.util.List;import java.util.Random;import javax.swing.JFrame;import javax.swing.JPanel;import javax.swing.JTabbedPane;import fr.umlv.projet.fenetre.Menu;import fr.umlv.projet.fenetre.TabbedPane;import fr.umlv.projet.fenetre.preformance.bigger.Card;import fr.umlv.projet.procfs.CpuTime;import fr.umlv.projet.procfs.Meminfo;import fr.umlv.projet.procfs.TestCpu;public class main {public static long time = 1000; /** * @param args */ public static void main(String[] args) { final JFrame frame = new JFrame("Processus"); frame.setLayout(new BorderLayout());// JTabbedPane tp = TabbedPane.creatTabbedPane(frame); Card card = new Card(); JPanel p = card.CreatCard(frame); final PanelBas pb = new PanelBas(); frame.add(p,BorderLayout.CENTER); frame.add(pb,BorderLayout.SOUTH); frame.setJMenuBar(Menu.creatMenuBar(frame)); ////////////////////////////////////////////////////// final List<Integer> l1 = new ArrayList<Integer>(); final List<Integer> l2 = new ArrayList<Integer>();// final CpuTime oldtime;// final CpuTime newtime; Runnable r = new Runnable(){ int d = 0; public void run() { CpuTime oldtime = TestCpu.getoldtime(); oldtime.loadCpuTime(); while(true){ if(d >= 10) d = d - 10; Card.refresh(d,oldtime,pb); d =d + 3; try { Thread.sleep(time); } catch (InterruptedException e) { e.printStackTrace(); } } } }; new Thread(r).start(); ////////////////////////////////////////////////////// frame.setSize(500,600); frame.setLocation(300,150); frame.setTitle("Gestionnaire des taches de windows"); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -