TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

Jogo Sodoku

Dissertações: Jogo Sodoku. Pesquise 860.000+ trabalhos acadêmicos

Por:   •  10/6/2014  •  870 Palavras (4 Páginas)  •  260 Visualizações

Página 1 de 4

package sudoku;

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

class Sudoku extends JFrame implements ActionListener

{

JTextField T1;

JButton B01,B02,B03,B11,B12,B13,B14,B15,B16,B17,B18,B19,B21,B22,B23,B24,B25,B26,B27,B28,B29,B31,B32,B33,B34,B35,B36,B37,B38,B39;

JButton B41,B42,B43,B44,B45,B46,B47,B48,B49,B51,B52,B53,B54,B55,B56,B57,B58,B59,B61,B62,B63,B64,B65,B66,B67,B68,B69;

JButton B71,B72,B73,B74,B75,B76,B77,B78,B79,B81,B82,B83,B84,B85,B86,B87,B88,B89,B91,B92,B93,B94,B95,B96,B97,B98,B99;

int a=0,k,l,h=1,aux=0,i=0,Q1=0,Q2=0,Q3=0,Q4=0,Q5=0,Q6=0,Q7=0,Q8=0,Q9=0,L1=0,L2=0,L3=0,L4=0,L5=0,L6=0,L7=0,L8=0,L9=0,S1=0,S2=0,S3=0,S4=0,S5=0,S6=0,S7=0,S8=0,S9=0;

int Matriz[][]=new int [9][9];

public void kiko (String Args[])

{

for (int k=0;k<9;k++)

for (int l=0;l<9;l++)

{

Matriz[k][l]=0;

}

}

public static void main(String Args[])

{

JFrame Janela=new Sudoku();

Janela.show();

}

Sudoku()

{

setTitle("JOGO SUDOKU - Rodrigo Adriano Sant'Anna Lopes");

setSize(420,340);

setLocation(300,300);

setResizable(false);

getContentPane().setBackground(new Color(150,150,150));

getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER));

B11=new JButton(" ");

B11.addActionListener(this);

B12=new JButton(" ");B12.addActionListener(this);

B13=new JButton(" ");B13.addActionListener(this);

B14=new JButton(" ");B14.addActionListener(this);

B15=new JButton(" ");B15.addActionListener(this);

B16=new JButton(" ");B16.addActionListener(this);

B17=new JButton(" ");B17.addActionListener(this);

B18=new JButton(" ");B18.addActionListener(this);

B19=new JButton(" ");B19.addActionListener(this);

B21=new JButton(" ");B21.addActionListener(this);

B22=new JButton(" ");B22.addActionListener(this);

B23=new JButton(" ");B23.addActionListener(this);

B24=new JButton(" ");B24.addActionListener(this);

B25=new JButton(" ");B25.addActionListener(this);

B26=new JButton(" ");B26.addActionListener(this);

B27=new JButton(" ");B27.addActionListener(this);

B28=new JButton(" ");B28.addActionListener(this);

B29=new JButton(" ");B29.addActionListener(this);

B31=new JButton(" ");B31.addActionListener(this);

B32=new JButton(" ");B32.addActionListener(this);

B33=new JButton(" ");B33.addActionListener(this);

B34=new JButton(" ");B34.addActionListener(this);

B35=new JButton(" ");B35.addActionListener(this);

B36=new JButton(" ");B36.addActionListener(this);

B37=new JButton(" ");B37.addActionListener(this);

B38=new JButton(" ");B38.addActionListener(this);

B39=new JButton(" ");B39.addActionListener(this);

B41=new JButton(" ");B41.addActionListener(this);

B42=new JButton(" ");B42.addActionListener(this);

B43=new JButton(" ");B43.addActionListener(this);

B44=new JButton(" ");B44.addActionListener(this);

B45=new JButton(" ");B45.addActionListener(this);

B46=new JButton(" ");B46.addActionListener(this);

B47=new JButton(" ");B47.addActionListener(this);

B48=new JButton(" ");B48.addActionListener(this);

B49=new JButton(" ");B49.addActionListener(this);

B51=new JButton(" ");B51.addActionListener(this);

B52=new JButton(" ");B52.addActionListener(this);

B53=new JButton(" ");B53.addActionListener(this);

B54=new JButton(" ");B54.addActionListener(this);

B55=new JButton(" ");B55.addActionListener(this);

B56=new JButton(" ");B56.addActionListener(this);

B57=new JButton(" ");B57.addActionListener(this);

B58=new JButton(" ");B58.addActionListener(this);

B59=new JButton(" ");B59.addActionListener(this);

B61=new

...

Baixar como (para membros premium)  txt (25.1 Kb)  
Continuar por mais 3 páginas »
Disponível apenas no TrabalhosGratuitos.com