cpu and memory form added

This commit is contained in:
RememBerBer 2021-11-17 13:53:37 +08:00
parent ec4afe8a57
commit 3a2f091e22
1 changed files with 7 additions and 3 deletions

View File

@ -60,13 +60,17 @@ public class MemoryForm {
memoryForm = getInstance();
initUi();
initPhysicalMemoryInfo();
Timer timer = new Timer(UiConsts.REFRESH_FAST, e -> {
initInfo();
memoryForm.getPhysicalMemoryInfoTextPane().setText(updateMemoryText());
initMemoryProgressInfo();
});
timer.start();
}
private static void initPhysicalMemoryInfo() {
memoryForm.getPhysicalMemoryInfoTextPane().setText(updateMemoryText());
}
private static void initUi() {
MemoryForm memoryForm = getInstance();
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();
// global memory