Why doesn't this sort of thing work ?
I created a method that takes one String, and that method will set a new path of an ImageIcon based on the parameter passed in. and then return it.
I had planned on using it as a neat little method to swap the players current image form different classes.
based on KeyEvents trigged, to reflect a player jumping, or walking and so forth.
Thanks.
I created a method that takes one String, and that method will set a new path of an ImageIcon based on the parameter passed in. and then return it.
I had planned on using it as a neat little method to swap the players current image form different classes.
based on KeyEvents trigged, to reflect a player jumping, or walking and so forth.
private static String player_ii_path = ""; static ImageIcon player_ii = new ImageIcon(player_ii_path) ; static Image player = player_ii.getImage() ; public static String set_new_player_ii_path(String p_new_player_ii_Path) { player_ii_path = p_new_player_ii_Path ; return player_ii_path ; }
Thanks.