int a = Graphics.LEFT | Graphics.TOP; int b = Graphics.LEFT | Graphics.BASELINE; int c = Graphics.LEFT | Graphics.VCENTER; int d = Graphics.LEFT | Graphics.BOTTOM; int e = Graphics.RIGHT | Graphics.TOP; int f = Graphics.RIGHT | Graphics.BASELINE; int g = Graphics.RIGHT | Graphics.VCENTER; int h = Graphics.RIGHT | Graphics.BOTTOM; int i = Graphics.HCENTER | Graphics.TOP; int j = Graphics.HCENTER | Graphics.BASELINE; int k = Graphics.HCENTER | Graphics.VCENTER; int l = Graphics.HCENTER | Graphics.BOTTOM; System.out.println("a is : "+a); System.out.println("b is : "+b); System.out.println("c is : "+c); System.out.println("d is : "+d); System.out.println("e is : "+e); System.out.println("f is : "+f); System.out.println("g is : "+g); System.out.println("h is : "+h); System.out.println("i is : "+i); System.out.println("j is : "+j); System.out.println("k is : "+k); System.out.println("l is : "+l);
打印結果為: a is : 20
b is : 68
c is : 6
d is : 36
e is : 24
f is : 72
g is : 10
h is : 40
i is : 17
j is : 65
k is : 3
l is : 33