Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BufferedImage background;
- background = loadPics("data/background2.png");
- private BufferedImage loadPics (String path)
- {
- BufferedImage bild = null;
- BufferedImage source = null;
- URL pic_url = getClass().getClassLoader().getResource(path);
- System.out.println(pic_url.getPath());
- try {
- bild = ImageIO.read(new File("pic_url"));
- } catch (IOException e) {}
- return bild;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement