public Battleship()
	{	
		setTitle("Battleship");		
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setJMenuBar(createMenuBar());
		setResizable(false);			
		
		//gets user to input name
		user=JOptionPane.showInputDialog("Enter your name.");		
		int dummy=0;
		while (((user==null)||(user.equals("")))&&(dummy<3))
		{				
			user=JOptionPane.showInputDialog("You have to input something.");
			if ((user!=null)&&(!user.equals("")))
				dummy=4;
			else
				dummy++;
		}
		if (dummy==3)
		{
			JOptionPane.showMessageDialog(null,"Since you're having trouble inp"
			+"utting your name, I'll just call you stupid.","",JOptionPane.INFORMATION_MESSAGE);
			user="Stupid";
		}
		players[you]=new Player (user);
		players[enemy]=new Player ("Computer");						
		b=getContentPane();		
		b.add(setBoard(you),BorderLayout.CENTER);			
		c=getContentPane();
		d = getContentPane();
		inputpanel=shipinput();
		d.add(inputpanel,BorderLayout.NORTH);			
		pack();		
		setVisible(true);
		
	}