AWTGears: Make the canvas the same size as the Gears test

This commit is contained in:
Elias Naur 2008-01-18 10:29:01 +00:00
parent 8f677f1585
commit d184509ac7
1 changed files with 4 additions and 2 deletions

View File

@ -76,9 +76,10 @@ public class AWTGears extends Frame {
*/ */
public AWTGears() throws LWJGLException { public AWTGears() throws LWJGLException {
setTitle("Gears"); setTitle("Gears");
setSize(300, 300);
setBackground(Color.BLACK); setBackground(Color.BLACK);
add(new AWTGearsCanvas()); AWTGearsCanvas canvas = new AWTGearsCanvas();
canvas.setSize(300, 300);
add(canvas);
addWindowListener(new WindowAdapter() { addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) { public void windowClosing(WindowEvent e) {
dispose(); dispose();
@ -86,6 +87,7 @@ public class AWTGears extends Frame {
} }
}); });
setResizable(true); setResizable(true);
pack();
setVisible(true); setVisible(true);
} }