src/de/uapcore/sudoku/Sudoku.java

Sat, 26 Jan 2013 15:48:59 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 26 Jan 2013 15:48:59 +0100
changeset 1
f1d7de36b01e
child 2
5179eff8a9b6
permissions
-rw-r--r--

init project + editable sudoku field

     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 class Sudoku extends JFrame {
    16     public Sudoku() {
    17         super("Sudoku");
    19         JRootPane root = getRootPane();
    21         root.setLayout(new GridBagLayout());
    22         GridBagConstraints c = new GridBagConstraints();
    23         c.insets = new Insets(20, 20, 20, 20);
    25         c.gridx = 0; c.gridy = 0;
    26         root.add(new Field(), c);
    28         pack();
    29         root.setBackground(Color.WHITE);
    30         setLocationByPlatform(true);
    31         setDefaultCloseOperation(EXIT_ON_CLOSE);
    32     }
    34     /**
    35      * @param args the command line arguments
    36      */
    37     public static void main(String[] args) {
    38         new Sudoku().setVisible(true);
    39     }
    40 }

mercurial