home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-04-15 | 1.0 KB | 44 lines |
- /**
- *
- * Ball.java
- * @author Jeremy Hutchins (jgh8962@cs.rit.edu)
- * @version 1.0
- * Feb 23/1996
- *
- *
- *
- */
-
- import java.awt.*;
- import java.awt.event.*;
- import com.next.gt.*;
-
- public class WindowResizer extends ComponentAdapter {
-
- private DisplayManager displayManager;
- private Gamelication owner;
-
- public WindowResizer( DisplayManager displayManager, Gamelication owner ) {
- this.displayManager = displayManager;
- this.owner = owner;
- }
-
- public void componentShown( ComponentEvent e ) {
- displayManager.paint( owner.getGraphics() );
- }
-
- public void componentHidden( ComponentEvent e ) {
- displayManager.paint( owner.getGraphics() );
- }
-
- public void componentResized(ComponentEvent e) {
- owner.setSize( e.getComponent().getSize().width -5,
- e.getComponent().getSize().height -25 );
- displayManager.setBackgroundTile (owner.getImage( owner.getCodeBase(), "images/background.gif"));
- //owner.setBackground( Color.gray );
- //owner.repaint();
- displayManager.paint( owner.getGraphics() );
- }
-
- } /*Ball*/
-