document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  *  Final Project PBO
  3.  *  Class About
  4.  *  
  5.  *  @author Aimar Wibowo
  6.  *  @author Timotius Wirawan
  7.  *  @version 11 Januari 2021
  8.  */
  9.  
  10. import java.awt.*;
  11. import java.awt.event.ActionEvent;
  12. import java.awt.event.ActionListener;
  13.  
  14. import javax.swing.*;
  15. import javax.swing.text.StyledEditorKit.ItalicAction;
  16.  
  17. public  class About extends JFrame{
  18.     ImagePanel panel = new ImagePanel();
  19.     JButton back = new JButton(panel.imageback);
  20.     public About() {
  21.         back.setBorder(null);
  22.         back.setBounds(300,450, 200,45);
  23.         this.add(back);
  24.         this.add(panel);
  25.         back.addActionListener(new backPage());
  26.     }
  27.    
  28.     class ImagePanel extends JPanel{
  29.         private ImageIcon imageIcon = new ImageIcon("images/aboutbg.jpg");
  30.         private ImageIcon imageback = new ImageIcon("images/back.jpg");
  31.         private Image image = imageIcon.getImage();
  32.         protected void paintComponent(Graphics g){
  33.             super.paintComponent(g);
  34.             g.drawImage(image, 0, 0, getWidth(), getHeight(), this);
  35.          }
  36.       }
  37.     }
  38.  
  39.     class backPage implements ActionListener {
  40.         public void actionPerformed(ActionEvent e){
  41.             GameMain.buttonmusic();
  42.             FirstPage sPage =new FirstPage();
  43.             sPage.setTitle("Tower Of Hanoi");
  44.             sPage.setSize(800, 600);
  45.             sPage.setLocationRelativeTo(null); // Center the newFrame
  46.             sPage.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  47.             sPage.setResizable(false);
  48.             sPage.setVisible(true);
  49.           }
  50.     }
  51.    
  52.     class backPage1 implements ActionListener {
  53.         public void actionPerformed(ActionEvent e){
  54.             GameMain.buttonmusic();
  55.             MenuFrame sPage =new MenuFrame();
  56.             sPage.setTitle("Main Menu");
  57.             sPage.setSize(800, 600);
  58.             sPage.setLocationRelativeTo(null);
  59.             sPage.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  60.             sPage.setResizable(false);
  61.             sPage.setVisible(true);
  62.           }
  63.     }
');