Somehow fixed the problem with the timer activating too soon by changing the timer start to when it is in the "inner process" of the main method
This commit is contained in:
20
Java/ProjectModels/Visualizer/ScreenFrame.java
Normal file
20
Java/ProjectModels/Visualizer/ScreenFrame.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package Visualizer;
|
||||
|
||||
import javax.script.ScriptEngine;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class ScreenFrame extends JFrame {
|
||||
ScreenManager sm;
|
||||
public ScreenFrame(ScreenManager sm, Dimension d) {
|
||||
this.sm = sm;
|
||||
this.setPreferredSize(d);
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
this.setVisible(true);
|
||||
this.setFocusable(true);
|
||||
this.add(sm);
|
||||
this.pack();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user