Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. public class Galaga extends JFrame {
  2. private static final long serialVersionUID = 1L;
  3.  
  4. private JPanel mainPanel;//main menu with top-level button
  5. private JPanel optionsPanel; //has option buttons and detail
  6. private JPanel highScorePanel; //shows high scores
  7. public BufferedImage image;
  8.  
  9. public Galaga(String t) {
  10. super(t);
  11.  
  12. JLayeredPane pane = this.getLayeredPane();
  13. File img = new File("images/Spacebackground.png");
  14. try {
  15. image = ImageIO.read(img);
  16. } catch (IOException e) {
  17. e.printStackTrace();
  18. System.exit(1);
  19. }
  20.  
  21. mainPanel = new MainPanel(this);
  22. mainPanel.setOpaque(false);
  23. mainPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));
  24. add(mainPanel, BorderLayout.CENTER);//adds main panel
  25. }//ends Galaga function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement