Increase refresh rate and constantly submit frames
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
8cbc0eb65f
commit
79ea82da4f
@ -4,6 +4,8 @@ import java.awt.GraphicsConfiguration;
|
|||||||
import java.awt.GraphicsEnvironment;
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.awt.Image;
|
import java.awt.Image;
|
||||||
import java.awt.Toolkit;
|
import java.awt.Toolkit;
|
||||||
|
import java.awt.event.ComponentEvent;
|
||||||
|
import java.awt.event.ComponentListener;
|
||||||
import java.awt.image.ColorModel;
|
import java.awt.image.ColorModel;
|
||||||
import java.awt.image.MemoryImageSource;
|
import java.awt.image.MemoryImageSource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -37,6 +39,33 @@ public class Panel extends JPanel implements Runnable {
|
|||||||
super(true);
|
super(true);
|
||||||
this.window=f;
|
this.window=f;
|
||||||
thread = new Thread(this, "MyPanel Thread");
|
thread = new Thread(this, "MyPanel Thread");
|
||||||
|
this.addComponentListener(new ComponentListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void componentHidden(ComponentEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void componentMoved(ComponentEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void componentResized(ComponentEvent e) {
|
||||||
|
System.out.println("Resized");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void componentShown(ComponentEvent e) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user