mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 01:40:43 +00:00
internal sound playing refactoring
diplay sound icon ffdec:format code, organize imports
This commit is contained in:
@@ -26,7 +26,6 @@ import java.awt.GraphicsEnvironment;
|
||||
import java.awt.Image;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.TexturePaint;
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.Window;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.KeyEvent;
|
||||
@@ -222,9 +221,13 @@ public class View {
|
||||
* @param name Name of the image
|
||||
* @return loaded Image
|
||||
*/
|
||||
public static Image loadImage(String name) {
|
||||
public static BufferedImage loadImage(String name) {
|
||||
java.net.URL imageURL = View.class.getResource("/com/jpexs/decompiler/flash/gui/graphics/" + name + ".png");
|
||||
return Toolkit.getDefaultToolkit().createImage(imageURL);
|
||||
try {
|
||||
return ImageIO.read(imageURL);
|
||||
} catch (IOException ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user