Browse Source

Loads png from jar

Thomas Buck 12 years ago
parent
commit
c7f58dcbdf
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      Cube Control/layerEditFrame.java

+ 3
- 3
Cube Control/layerEditFrame.java View File

@@ -15,8 +15,8 @@ public class layerEditFrame extends JFrame {
15 15
   // Anfang Attribute
16 16
   private JPanel panelLED1 = new JPanel(null, true);
17 17
   JButton[][] ledPanels = new JButton[8][8];
18
-  static ImageIcon on = new ImageIcon("LEDon.png");
19
-  static ImageIcon off = new ImageIcon("LEDoff.png");
18
+  ImageIcon on = new ImageIcon(getClass().getResource("LEDon.png"));
19
+  ImageIcon off = new ImageIcon(getClass().getResource("LEDoff.png"));
20 20
   boolean changedStateSinceSave = false;
21 21
   byte[] frame;
22 22
 
@@ -139,4 +139,4 @@ public class layerEditFrame extends JFrame {
139 139
        return 0;
140 140
     }
141 141
   }
142
-}
142
+}

Loading…
Cancel
Save