cpu and memory form added
This commit is contained in:
parent
ec4afe8a57
commit
3a2f091e22
|
@ -60,13 +60,17 @@ public class MemoryForm {
|
||||||
memoryForm = getInstance();
|
memoryForm = getInstance();
|
||||||
|
|
||||||
initUi();
|
initUi();
|
||||||
|
initPhysicalMemoryInfo();
|
||||||
Timer timer = new Timer(UiConsts.REFRESH_FAST, e -> {
|
Timer timer = new Timer(UiConsts.REFRESH_FAST, e -> {
|
||||||
initInfo();
|
initMemoryProgressInfo();
|
||||||
memoryForm.getPhysicalMemoryInfoTextPane().setText(updateMemoryText());
|
|
||||||
});
|
});
|
||||||
timer.start();
|
timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void initPhysicalMemoryInfo() {
|
||||||
|
memoryForm.getPhysicalMemoryInfoTextPane().setText(updateMemoryText());
|
||||||
|
}
|
||||||
|
|
||||||
private static void initUi() {
|
private static void initUi() {
|
||||||
MemoryForm memoryForm = getInstance();
|
MemoryForm memoryForm = getInstance();
|
||||||
JPanel mainPanel = memoryForm.getMainPanel();
|
JPanel mainPanel = memoryForm.getMainPanel();
|
||||||
|
@ -82,7 +86,7 @@ public class MemoryForm {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initInfo() {
|
private static void initMemoryProgressInfo() {
|
||||||
GlobalMemory memory = App.si.getHardware().getMemory();
|
GlobalMemory memory = App.si.getHardware().getMemory();
|
||||||
|
|
||||||
// global memory
|
// global memory
|
||||||
|
|
Loading…
Reference in New Issue