MCPcopy Index your code
hub / github.com/adolfintel/NoteBot / loadImage

Method loadImage

StickyNotes/src/com/dosse/stickynotes/Note.java:198–206  ·  view source on GitHub ↗

load image from classpath (it will be the jar file) @param pathInClasspath path in classpath @return the image, or an empty image if something went wrong

(String pathInClasspath)

Source from the content-addressed store, hash-verified

196 * @return the image, or an empty image if something went wrong
197 */
198 public static final Image loadImage(String pathInClasspath) {
199 try {
200 return ImageIO.read(Note.class.getResource(pathInClasspath));
201 } catch (IOException ex) {
202 BufferedImage i = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
203 i.setRGB(0, 0, 0);
204 return i;
205 }
206 }
207
208 //UI Elements
209 private final JPanel wrapper1; //outer wrapper: it's the area that the user can use to resize the window

Callers 1

NoteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected