Selaa lähdekoodia

Loads png from jar

Thomas Buck 12 vuotta sitten
vanhempi
commit
c7f58dcbdf
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3
    3
      Cube Control/layerEditFrame.java

+ 3
- 3
Cube Control/layerEditFrame.java Näytä tiedosto

15
   // Anfang Attribute
15
   // Anfang Attribute
16
   private JPanel panelLED1 = new JPanel(null, true);
16
   private JPanel panelLED1 = new JPanel(null, true);
17
   JButton[][] ledPanels = new JButton[8][8];
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
   boolean changedStateSinceSave = false;
20
   boolean changedStateSinceSave = false;
21
   byte[] frame;
21
   byte[] frame;
22
 
22
 
139
        return 0;
139
        return 0;
140
     }
140
     }
141
   }
141
   }
142
-}
142
+}

Loading…
Peruuta
Tallenna