All pastes #249608 Raw Edit

Anonymous

public text v1 · immutable
#249608 ·published 2006-11-15 23:34 UTC
rendered paste body
public class SudokuPanel extends JPanel implements ActionListener
{
	/**
	 * Constructs a SudokuPanel object and initializes a SudokuPanelListener to act as a MouseListener
	 *
	 */  
	public SudokuPanel() { 
		    /*listener = new SudokuPanelListener(this); 
		    addMouseListener((MouseListener) listener); 
		    addMouseMotionListener((MouseMotionListener) listener); */
		setLayout(new GridLayout(9,9));
		//textArea = new JTextArea(9,9);
		sudokuBoard = new JTextField[9][9];
		for(int i = 0; i < 9; i++)
			for(int j = 0; j < 9; j++)
			{
				add(sudokuBoard[i][j] = new JTextField(1));
			}
		  }
	
	/**
	 * 
	 */
    public void actionPerformed(ActionEvent evt) {
    	
        //String text = textField.getText();
        //textArea.append(text + newline);
        //textField.selectAll();

        //Make sure the new text is visible, even if there
        //was a selection in the text area.
        //textArea.setCaretPosition(textArea.getDocument().getLength());
    }


    protected JTextField[][] sudokuBoard;