Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.maineri.mainepix;
- import java.util.Random;
- import javax.swing.JFrame;
- public class Game {
- static JFrame frame;
- static String[] myStringArray = new String[]{
- "\"Bankruptcy is bad!\"", //Work
- "\"Money doesn't make happy!\"", //Work
- "\"The World needs butterfields...\"", //Work
- "\"Made by Maineri\"", //Work
- "\"Send feedback to ********\"", //Work
- "\"World is horrible place!\"", //Work
- "\"Java Programming is good hobby!\"", //Work
- "\"Finland is wonderful place!\"", //Work
- "\"Please try this game!\"" //Work
- };
- public static final int WIDTH = 600;
- public static final int HEIGHT = 400;
- public static void main(String[] args) {
- GamePanel gp;
- int max = 10;
- int min = 1;
- Random rand = new Random();
- int RandomNum = rand.nextInt(max - min);
- frame = new JFrame("Business Game - " + myStringArray[RandomNum]);
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.setResizable(false);
- frame.add(gp = new GamePanel());
- frame.pack();
- frame.setLocationRelativeTo(null);
- frame.setSize(WIDTH, HEIGHT);
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment