소스 검색

Loads png from jar

Thomas Buck 12 년 전
부모
커밋
c7f58dcbdf
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3
    3
      Cube Control/layerEditFrame.java

+ 3
- 3
Cube Control/layerEditFrame.java 파일 보기

@@ -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…
취소
저장