From 04a29bc5973ec5384e06f52b0710365d8f549c82 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 21 Jan 2007 07:36:17 +0000 Subject: 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 --- src/demos/j2d/FlyingText.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/demos/j2d/FlyingText.java') 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) { -- cgit v1.2.3