Advertisement
Guest User

Can't public static?

a guest
Dec 15th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.61 KB | None | 0 0
  1. package main;
  2.  
  3. import java.io.IOException;
  4.  
  5. import org.newdawn.slick.opengl.Texture;
  6. import org.newdawn.slick.opengl.TextureLoader;
  7. import org.newdawn.slick.util.ResourceLoader;
  8.  
  9. public class Textures {
  10.    
  11.     public static Texture loadPNG(String path) throws IOException {
  12.         return TextureLoader.getTexture("PNG", ResourceLoader.getResourceAsStream(path));
  13.     }
  14.    
  15.    
  16.     public static boolean loadTextures() {
  17.         try {
  18.             final Texture STONE = loadPNG("main\\textures\\stone.png"); // This line here I can't do public static final...
  19.            
  20.         } catch (IOException e) {
  21.             return false;
  22.         }
  23.         return true;
  24.     }
  25.    
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement