import java.awt.*;

import javax.swing.*;


public class StartPage extends JFrame {
	private Timer timer;
	private int minutes;
	private int seconds;
	private Board gameBoard;

	public StartPage(){
		setTitle("Sudoku Master");
		setSize(567,567); //create another background image for this JFrame
		setResizable(false);
		setLocationRelativeTo(null);
		setLayout(null);

		JButton newGame = new JButton();
		newGame.setBounds(189, 180, 189, 50);
		newGame.setText("New Game");
		newGame.addActionListener(e -> gameOption());
		JButton loadGame = new JButton();
		loadGame.setBounds(189, 360, 189, 50);
		loadGame.setText("Load Game");
		loadGame.addActionListener(e -> load());


		add(newGame);
		add(loadGame);


		setVisible(true);

	}

	private void gameOption() {
		JFrame newGame = new JFrame();
		JLabel question = new JLabel("What difficulty would you like your new Sudoku game to be?");
		newGame.setTitle("New Game");
		newGame.setSize(300, 200);
		newGame.setResizable(false);
		newGame.setLayout(new GridLayout(0,1));
		newGame.setLocationRelativeTo(null);
		JButton easy = new JButton("Easy");
		JButton medium = new JButton("Medium");
		JButton hard = new JButton("Hard");
		easy.addActionListener(e -> newGame(newGame,1));
		medium.addActionListener(e -> newGame(newGame,2));
		hard.addActionListener(e -> newGame(newGame,3));
		newGame.add(easy);
		newGame.add(medium);
		newGame.add(hard);
		newGame.setVisible(true);


	}


	private void newGame(JFrame newGame, int difficulty) {
		Game game = new Game(difficulty, true); //temporary fix
		newGame.dispose();
		dispose();
	}

	public void load() { //needs polish
		
	
		ImageIcon pause = new ImageIcon("src/resources/pause.png");
		Game oldGame = new Game(4,true);
		oldGame.setVisible(false);
		oldGame.load(pause);
		//oldGame.setVisible(true);

		dispose();
	}



}

@@ -17,196 +17,412 @@
 *;%0D%0A
-%0D%0Aimport javax.swing.*;%0D%0A%0D%0A%0D%0Apublic class StartPage extends JFrame %7B%0D%0A%09private Timer timer;%0D%0A%09private int minutes;%0D%0A%09private int seconds;%0D%0A%09private Board gameBoard;%0D%0A%0D%0A%09public StartPage()%7B
+import java.awt.image.BufferedImage;%0D%0Aimport java.io.File;%0D%0Aimport java.io.IOException;%0D%0A%0D%0Aimport javax.imageio.ImageIO;%0D%0Aimport javax.swing.*;%0D%0A%0D%0A%0D%0Apublic class StartPage extends JFrame %7B %0D%0A%0D%0A%09%0D%0A%09public StartPage() throws IOException%7B%0D%0A%09%09BufferedImage image = ImageIO.read(new File(%22src/resources/startPage.png%22)); //background image of the board%0D%0A%09%09JLabel background = new JLabel(new ImageIcon(image));
 %0D%0A%09%09
@@ -445,24 +445,28 @@
  Master%22);%0D%0A
+%09%09%0D%0A
 %09%09setSize(56
@@ -469,65 +469,75 @@
 e(56
-7,567); //create another background image for this JFrame
+8,568);%0D%0A%09%09background.setSize(image.getWidth(),image.getHeight()); 
 %0D%0A%09%09
@@ -923,26 +923,34 @@
 %3E load());%0D%0A
-%0D%0A
+%09%09%0D%0A%09%09%0D%0A%09%09
 %0D%0A%09%09add(newG
@@ -974,18 +974,68 @@
 Game);%0D%0A
-%0D%0A
+%09%09add(background);%0D%0A%09%09//background.setVisible(true);
 %0D%0A%09%09setV
@@ -1050,24 +1050,27 @@
 rue);%0D%0A%0D%0A%09%7D%0D
+%0A%09%0D
 %0A%0D%0A%09private 
@@ -2172,24 +2172,26 @@
 true);%0D%0A%0D%0A%09%09
+//
 dispose();%0D%0A

Add background image to StartPage