diff options
author | Kenneth Russel <[email protected]> | 2007-01-21 07:36:17 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-01-21 07:36:17 +0000 |
commit | 04a29bc5973ec5384e06f52b0710365d8f549c82 (patch) | |
tree | b32bcb7498c348dda8192b94c5ffa1e6248903b0 /src/demos/j2d | |
parent | bcf613662e21968bc326d56a0c87dbc9377b545f (diff) |
Made default size of demo window larger
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@202 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/j2d')
-rwxr-xr-x | src/demos/j2d/FlyingText.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/demos/j2d/FlyingText.java b/src/demos/j2d/FlyingText.java index 83bc77d..205263e 100755 --- a/src/demos/j2d/FlyingText.java +++ b/src/demos/j2d/FlyingText.java @@ -42,8 +42,10 @@ package demos.j2d; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; +import java.awt.DisplayMode; import java.awt.Font; import java.awt.Graphics2D; +import java.awt.GraphicsEnvironment; import java.awt.event.*; import java.awt.image.*; import java.text.*; @@ -77,7 +79,12 @@ public class FlyingText extends Demo { frame.getContentPane().add(canvas, BorderLayout.CENTER); frame.getContentPane().add(demo.buildGUI(), BorderLayout.NORTH); - frame.setSize(512, 512); + DisplayMode mode = + GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDisplayMode(); + + frame.setSize((int) (0.75f * mode.getWidth()), + (int) (0.75f * mode.getHeight())); + final Animator animator = new Animator(canvas); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { |