Sat, 26 Jan 2013 17:42:07 +0100
check functions
universe@1 | 1 | package de.uapcore.sudoku; |
universe@1 | 2 | |
universe@1 | 3 | import java.awt.Color; |
universe@1 | 4 | import java.awt.GridBagConstraints; |
universe@1 | 5 | import java.awt.GridBagLayout; |
universe@1 | 6 | import java.awt.Insets; |
universe@1 | 7 | import javax.swing.JFrame; |
universe@1 | 8 | import javax.swing.JRootPane; |
universe@1 | 9 | |
universe@1 | 10 | /** |
universe@1 | 11 | * |
universe@1 | 12 | * @author mike |
universe@1 | 13 | */ |
universe@2 | 14 | public final class Sudoku extends JFrame { |
universe@1 | 15 | |
universe@1 | 16 | public Sudoku() { |
universe@1 | 17 | super("Sudoku"); |
universe@1 | 18 | |
universe@2 | 19 | Field f = new Field(); |
universe@2 | 20 | ActionHandler h = new ActionHandler(f); |
universe@2 | 21 | |
universe@1 | 22 | JRootPane root = getRootPane(); |
universe@1 | 23 | |
universe@1 | 24 | root.setLayout(new GridBagLayout()); |
universe@1 | 25 | GridBagConstraints c = new GridBagConstraints(); |
universe@1 | 26 | c.insets = new Insets(20, 20, 20, 20); |
universe@2 | 27 | c.fill = GridBagConstraints.HORIZONTAL; |
universe@1 | 28 | |
universe@1 | 29 | c.gridx = 0; c.gridy = 0; |
universe@2 | 30 | root.add(f, c); |
universe@2 | 31 | c.gridy++; |
universe@2 | 32 | root.add(new ButtonPanel(h), c); |
universe@1 | 33 | |
universe@1 | 34 | pack(); |
universe@1 | 35 | root.setBackground(Color.WHITE); |
universe@1 | 36 | setLocationByPlatform(true); |
universe@1 | 37 | setDefaultCloseOperation(EXIT_ON_CLOSE); |
universe@1 | 38 | } |
universe@1 | 39 | |
universe@1 | 40 | /** |
universe@1 | 41 | * @param args the command line arguments |
universe@1 | 42 | */ |
universe@1 | 43 | public static void main(String[] args) { |
universe@1 | 44 | new Sudoku().setVisible(true); |
universe@1 | 45 | } |
universe@1 | 46 | } |