}
}
}
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Font;
import java.awt.FontMetrics;
/**
* A PuzzleTile class; this class inherits from JPanel.
*
* The tiles do not have any numbers painted on them yet.
* The only indication you will be able to visibly see at this point
* is that the 0 tile should be white and the rest gray.
*
* @author Laurissa
* @version 1.0
* @author Paula
* @version 1.1
*/
public class PuzzleTile extends JPanel {
private String tileNumber;
/**
* This constructor takes in the number you would like
* displayed on this panel and saves it as the String
* instance variable tileNumber.
* Note that you will still have to paint it onto the panel.
* You should do that by overriding the method:
* public void paintComponent(Graphics g){}.
*
* @param number The number to paint on the panel.
*/
public void paintComponent(Graphics g){
super.paintComponent(g);
Font myFont=new Font("Arial",Font.BOLD,30); // set font style