diff --git a/core/PApplet.java b/core/PApplet.java index af4a95219..e243296e3 100644 --- a/core/PApplet.java +++ b/core/PApplet.java @@ -3306,7 +3306,7 @@ public class PApplet extends Applet static public File inputFile(String prompt, Frame parentFrame) { if (parentFrame == null) parentFrame = new Frame(); FileDialog fd = new FileDialog(parentFrame, prompt, FileDialog.LOAD); - fd.show(); + fd.setVisible(true); String directory = fd.getDirectory(); String filename = fd.getFile(); @@ -3350,7 +3350,7 @@ public class PApplet extends Applet static public File outputFile(String prompt, Frame parentFrame) { if (parentFrame == null) parentFrame = new Frame(); FileDialog fd = new FileDialog(parentFrame, prompt, FileDialog.SAVE); - fd.show(); + fd.setVisible(true); String directory = fd.getDirectory(); String filename = fd.getFile(); @@ -5968,7 +5968,7 @@ public class PApplet extends Applet // all set for rockin if (applet.displayable()) { - frame.show(); + frame.setVisible(true); } } diff --git a/core/PFont.java b/core/PFont.java index 09718ba45..b6b00f004 100644 --- a/core/PFont.java +++ b/core/PFont.java @@ -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(); diff --git a/core/PImage.java b/core/PImage.java index 7e091754a..3cc54a6e5 100644 --- a/core/PImage.java +++ b/core/PImage.java @@ -115,6 +115,11 @@ public class PImage implements PConstants, Cloneable { } + public PImage(int width, int height, int format) { + init(width, height, format); + } + + public PImage(int pixels[], int width, int height, int format) { this.pixels = pixels; this.width = width;