document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  *  Final Project PBO
  3.  *  Class GameHold
  4.  *  
  5.  *  @author Aimar Wibowo
  6.  *  @author Timotius Wirawan
  7.  *  @version 11 Januari 2021
  8.  */
  9.  
  10. import java.awt.*;
  11. import java.awt.geom.*;
  12. import java.awt.event.*;
  13. import javax.swing.*;
  14. import java.util.*;
  15.  
  16. public class GameHold implements ActionListener{
  17.     private static JFrame gameFrame = new JFrame();
  18.    
  19.     public GameHold(String title,int level) {
  20.         gameFrame.setTitle(title);
  21.         build();
  22.         System.out.println("inside temp: " + level);
  23.         call(level);
  24.     }
  25.  
  26.     public static void sevisiblex(){
  27.         gameFrame.setVisible(false);
  28.     }
  29.      
  30.     private void build(){
  31.         gameFrame.setSize(900, 700);;
  32.         gameFrame.setResizable(false);
  33.         gameFrame.setLocationRelativeTo(null);
  34.         gameFrame.setVisible(true);
  35.         gameFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  36.     }
  37.    
  38.     public  void call(int level) {
  39.         System.out.println("inside call: " + level);
  40.         Tower t =new Tower(level);
  41.         gameFrame.getContentPane().add(t);
  42.     }
  43.  
  44.     @Override
  45.     public void actionPerformed(ActionEvent arg0) {
  46.         // TODO Auto-generated method stub
  47.        
  48.     }
  49. }
');