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

package de.uapcore.sudoku;

import java.awt.Color;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JFrame;
import javax.swing.JRootPane;

/**
 *
 * @author mike
 */
public final class Sudoku extends JFrame {
    
    public Sudoku() {
        super("Sudoku");
        
        Field f = new Field();
        ActionHandler h = new ActionHandler(f);
        
        JRootPane root = getRootPane();
        
        root.setLayout(new GridBagLayout());
        GridBagConstraints c = new GridBagConstraints();
        c.insets = new Insets(20, 20, 20, 20);
        c.fill = GridBagConstraints.HORIZONTAL;
        
        c.gridx = 0; c.gridy = 0;
        root.add(f, c);
        c.gridy++;
        root.add(new ButtonPanel(h), c);
        
        pack();
        root.setBackground(Color.WHITE);
        setLocationByPlatform(true);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new Sudoku().setVisible(true);
    }
}

mercurial