makefile
This commit is contained in:
parent
ca3592cc83
commit
c9efc37ef3
37
Sudoku/Makefile
Normal file
37
Sudoku/Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
### VARIABLES ###
|
||||
|
||||
JC = javac
|
||||
JCFLAGS = -encoding UTF-8 -implicit:none
|
||||
|
||||
JVM = java
|
||||
JVMFLAGS =
|
||||
|
||||
### REGLES ESSENTIELLES ###
|
||||
|
||||
main.class : main.java menu.class
|
||||
${JC} ${JCFLAGS} main.java
|
||||
|
||||
grille.class : grille.java resolveurGrille.class
|
||||
${JC} ${JCFLAGS} grille.java
|
||||
|
||||
menu.class : menu.java resolveurGrille.class grille.class
|
||||
${JC} ${JCFLAGS} menu.java
|
||||
|
||||
resolveurGrille.class : resolveurGrille.java
|
||||
${JC} ${JCFLAGS} resolveurGrille.java
|
||||
|
||||
### REGLES OPTIONNELLES ###
|
||||
|
||||
run : main.class
|
||||
${JVM} ${JVMFLAGS} main
|
||||
|
||||
clean :
|
||||
-rm -f *.class
|
||||
|
||||
mrproper : clean main.class
|
||||
|
||||
### BUTS FACTICES ###
|
||||
|
||||
.PHONY : run clean mrproper
|
||||
|
||||
### FIN ###
|
@ -15,8 +15,8 @@ public class grille extends JComponent{
|
||||
public static void AfficherGrille (int[][] grille, boolean editable) {
|
||||
/*paramètre de base de la fenetre*/
|
||||
JFrame fenetre = new JFrame();
|
||||
fenetre.setSize(900, 1100);
|
||||
fenetre.setResizable(false);
|
||||
fenetre.setSize(900, 950);
|
||||
/*fenetre.setResizable(false);*/
|
||||
fenetre.setLocationRelativeTo(null);
|
||||
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
/*Panneau pour la grille */
|
||||
@ -127,19 +127,4 @@ public class grille extends JComponent{
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
class LimitJTextField extends PlainDocument {
|
||||
private int max;
|
||||
LimitJTextField(int max) {
|
||||
super();
|
||||
this.max = max;
|
||||
}
|
||||
public void insertString(int offset, String text, AttributeSet attr) throws BadLocationException {
|
||||
if (text == null)
|
||||
return;
|
||||
if ((getLength() + text.length()) <= max) {
|
||||
super.insertString(offset, text, attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user