瀏覽代碼

All Layer Buttons now call the LayerEdit Frame

LEDButtons now with color instead of images...
Max Nuding 12 年之前
父節點
當前提交
942a268a39
共有 4 個文件被更改,包括 9 次插入12 次删除
  1. 二進制
      Cube Control/LEDoff.png
  2. 二進制
      Cube Control/LEDon.png
  3. 7
    7
      Cube Control/frame.java
  4. 2
    5
      Cube Control/layerEditFrame.java

二進制
Cube Control/LEDoff.png 查看文件


二進制
Cube Control/LEDon.png 查看文件


+ 7
- 7
Cube Control/frame.java 查看文件

363
   }
363
   }
364
 
364
 
365
   public void editB_ActionPerformed(ActionEvent evt) {
365
   public void editB_ActionPerformed(ActionEvent evt) {
366
-
366
+     layerEditFrame layerFrame1 = new layerEditFrame();
367
   }
367
   }
368
 
368
 
369
   public void editC_ActionPerformed(ActionEvent evt) {
369
   public void editC_ActionPerformed(ActionEvent evt) {
370
-
370
+    layerEditFrame layerFrame1 = new layerEditFrame();
371
   }
371
   }
372
 
372
 
373
   public void editD_ActionPerformed(ActionEvent evt) {
373
   public void editD_ActionPerformed(ActionEvent evt) {
374
-
374
+    layerEditFrame layerFrame1 = new layerEditFrame();
375
   }
375
   }
376
 
376
 
377
   public void editE_ActionPerformed(ActionEvent evt) {
377
   public void editE_ActionPerformed(ActionEvent evt) {
378
-
378
+    layerEditFrame layerFrame1 = new layerEditFrame();
379
   }
379
   }
380
 
380
 
381
   public void editF_ActionPerformed(ActionEvent evt) {
381
   public void editF_ActionPerformed(ActionEvent evt) {
382
-
382
+    layerEditFrame layerFrame1 = new layerEditFrame();
383
   }
383
   }
384
 
384
 
385
   public void editG_ActionPerformed(ActionEvent evt) {
385
   public void editG_ActionPerformed(ActionEvent evt) {
386
-
386
+    layerEditFrame layerFrame1 = new layerEditFrame();
387
   }
387
   }
388
 
388
 
389
   public void editH_ActionPerformed(ActionEvent evt) {
389
   public void editH_ActionPerformed(ActionEvent evt) {
390
-
390
+    layerEditFrame layerFrame1 = new layerEditFrame();
391
   }
391
   }
392
 
392
 
393
   public void frameUp_ActionPerformed(ActionEvent evt) {
393
   public void frameUp_ActionPerformed(ActionEvent evt) {

+ 2
- 5
Cube Control/layerEditFrame.java 查看文件

14
 public class layerEditFrame extends JFrame {
14
 public class layerEditFrame extends JFrame {
15
   // Anfang Attribute
15
   // Anfang Attribute
16
   private JPanel panelLED1 = new JPanel(null, true);
16
   private JPanel panelLED1 = new JPanel(null, true);
17
-  public static ImageIcon on = new ImageIcon("LEDon.png");
18
-  public static ImageIcon off = new ImageIcon("LEDoff.png");
19
   JButton[][] ledPanels = new JButton[8][8];
17
   JButton[][] ledPanels = new JButton[8][8];
20
 
18
 
21
   // Ende Attribute
19
   // Ende Attribute
37
 
35
 
38
     for(int i = 0; i < 8; i++){
36
     for(int i = 0; i < 8; i++){
39
       for(int j = 0; j < 8; j++){
37
       for(int j = 0; j < 8; j++){
40
-         System.out.println(x);
41
-         System.out.println(y);
42
-         ledPanels[i][j] = new JButton(on);
38
+         ledPanels[i][j] = new JButton();
39
+         ledPanels[i][j].setBackground(Color.RED);
43
          ledPanels[i][j].setBounds((i*20)+5, (j*20)+5, 15, 15);
40
          ledPanels[i][j].setBounds((i*20)+5, (j*20)+5, 15, 15);
44
          ledPanels[i][j].setVisible(true);
41
          ledPanels[i][j].setVisible(true);
45
          cp.add(ledPanels[i][j]);
42
          cp.add(ledPanels[i][j]);

Loading…
取消
儲存