A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
graphlib_java.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define named classes to handle events.
[graphlib_java.git]
/
Hello.java
diff --git
a/Hello.java
b/Hello.java
index
e7b6dfa
..
8b3dc6f
100644
(file)
--- a/
Hello.java
+++ b/
Hello.java
@@
-1,8
+1,11
@@
-
public
class Hello {
+class Hello {
public static void main(String[] args) {
public static void main(String[] args) {
- DrawingWindow w = new DrawingWindow("Exemple 1", 640, 480);
+ // Création d'une fenêtre avec, en paramètres, son titre, sa
+ // largeur et sa hauteur
+ DrawingWindow w = new DrawingWindow("Hello", 640, 480);
+ // Affichage d'un court message au milieu de la fenêtre
w.drawText(w.width / 2, w.height / 2, "Hello world!");
}
}
w.drawText(w.width / 2, w.height / 2, "Hello world!");
}
}