src/de/uapcore/sudoku/Sudoku.java

Sat, 26 Jan 2013 17:42:07 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 26 Jan 2013 17:42:07 +0100
changeset 2
5179eff8a9b6
parent 1
f1d7de36b01e
child 3
ed931970b4ac
permissions
-rw-r--r--

check functions

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

mercurial