remove some eclipse warnings, and add a new PImage constructor

This commit is contained in:
benfry
2006-04-26 02:47:24 +00:00
parent 127eaa2a3e
commit d4f4a3558d
3 changed files with 12 additions and 7 deletions
+4 -4
View File
@@ -971,11 +971,11 @@ public class PFont implements PConstants {
// GraphicsEnvironment.getLocalGraphicsEnvironment();
Class geClass = Class.forName("java.awt.GraphicsEnvironment");
Method glgeMethod =
geClass.getMethod("getLocalGraphicsEnvironment", null);
Object ge = glgeMethod.invoke(null, null);
geClass.getMethod("getLocalGraphicsEnvironment", (Class[]) null);
Object ge = glgeMethod.invoke((Class[]) null, (Object[]) null);
Method gafMethod = geClass.getMethod("getAllFonts", null);
Font fonts[] = (Font[]) gafMethod.invoke(ge, null); //ge.getAllFonts();
Method gafMethod = geClass.getMethod("getAllFonts", (Class[]) null);
Font fonts[] = (Font[]) gafMethod.invoke(ge, (Object[]) null); //ge.getAllFonts();
String list[] = new String[fonts.length];
for (int i = 0; i < list.length; i++) {
list[i] = fonts[i].getName();