home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / Gamelication / examples / Boink / RCS / WindowResizer.java,v < prev   
Encoding:
Text File  |  1998-04-13  |  1.1 KB  |  63 lines

  1. head    1.1;
  2. access;
  3. symbols;
  4. locks
  5.     jgh8962:1.1; strict;
  6. comment    @# @;
  7.  
  8.  
  9. 1.1
  10. date    98.04.13.23.33.29;    author jgh8962;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @@
  17.  
  18.  
  19. 1.1
  20. log
  21. @Initial revision
  22. @
  23. text
  24. @/**
  25.  *
  26.  * Ball.java
  27.  * @@author    Jeremy Hutchins  (jgh8962@@cs.rit.edu)
  28.  * @@version    1.0
  29.  * Feb 23/1996
  30.  *
  31.  * 
  32.  *
  33.  */
  34.  
  35. import java.awt.*;
  36. import java.awt.event.*;
  37. import com.next.gt.*;
  38.  
  39. public class WindowResizer extends ComponentAdapter {
  40.  
  41.     private DisplayManager    displayManager;
  42.     private Gamelication    owner;
  43.  
  44.     public WindowResizer( DisplayManager displayManager, Gamelication owner ) {
  45.     this.displayManager = displayManager;
  46.     this.owner = owner;
  47.     }
  48.  
  49.     public void componentResized(ComponentEvent e) {
  50.         System.out.println( "componentResized called." );
  51.         System.out.println( e.getComponent().getSize().toString() );
  52.         owner.setSize( e.getComponent().getSize() );
  53.         System.out.println( "owner's size is: " + owner.getSize().toString() );
  54.     displayManager.setBackgroundTile (owner.getImage( owner.getCodeBase(), "images/background.gif"));
  55.     
  56.     }
  57.  
  58.  
  59.  
  60.  
  61. } /*Ball*/
  62. @
  63.