Skip to content
Snippets Groups Projects
Commit 6f0c270d authored by Anian Bühler's avatar Anian Bühler
Browse files

added correct path for img in GUI class

parent 2781b8d0
No related branches found
No related tags found
No related merge requests found
......@@ -97,29 +97,29 @@ public class GUI extends JFrame implements Runnable, ActionListener {
// Konstruktor der Module
modules[0] = new RGB(new ImageIcon(getToolkit()
.getImage(GUI.class.getResource("img/PM31_RGB_LED.png"))));
.getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/PM31_RGB_LED.png"))));
modules[1] = new Button(
new ImageIcon(getToolkit()
.getImage(GUI.class.getResource("img/PM26_Taster.png"))),
.getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/PM26_Taster.png"))),
new ImageIcon(getToolkit()
.getImage(GUI.class.getResource("img/Taster_Off.png"))),
.getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/Taster_Off.png"))),
new ImageIcon(getToolkit()
.getImage(GUI.class.getResource("img/Taster_On.png"))));
.getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/Taster_On.png"))));
modules[2] = new Poti(new ImageIcon(getToolkit()
.getImage(GUI.class.getResource("img/PM24_Potentiometer.png"))));
.getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/PM24_Potentiometer.png"))));
modules[3] = new ArduinoUno(
new ImageIcon(getToolkit()
.getImage(GUI.class.getResource("img/ArduinoUno.png"))),
.getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/ArduinoUno.png"))),
simu);
// this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //Vermutlich nicht
// gewnscht.
this.setResizable(true); //TODO Muss in true gendert werden wenn skalierbar
// gewnscht.
this.setResizable(true); //TODO Muss in true gendert werden wenn skalierbar
Container mainPane = this.getContentPane();
// Panel welches alle Module sowie die Verdrahtung enthlt.
// Panel welches alle Module sowie die Verdrahtung enthlt.
JPanel modulPanel = new JPanel(new BorderLayout()) {
private static final long serialVersionUID = 1L;
......@@ -139,7 +139,7 @@ public class GUI extends JFrame implements Runnable, ActionListener {
mainPane.add(createControlPanel(simu), BorderLayout.LINE_END);
mainPane.add(createSerialLog(), BorderLayout.PAGE_END);
this.pack();
// this.setLocation(-1300, 0); //Mglichkeit die Renderingposition festzulegen
// this.setLocation(-1300, 0); //Mglichkeit die Renderingposition festzulegen
this.setVisible(true);
}
......@@ -160,13 +160,13 @@ public class GUI extends JFrame implements Runnable, ActionListener {
JButton measButton = new JButton();
goButton.setIcon(new ImageIcon(
getToolkit().getImage(GUI.class.getResource("img/Play.png"))));
getToolkit().getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/Play.png"))));
stopButton.setIcon(new ImageIcon(
getToolkit().getImage(GUI.class.getResource("img/Stop.png"))));
getToolkit().getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/Stop.png"))));
reloadButton.setIcon(new ImageIcon(
getToolkit().getImage(GUI.class.getResource("img/Reload.png"))));
getToolkit().getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/Reload.png"))));
measButton.setIcon(new ImageIcon(
getToolkit().getImage(GUI.class.getResource("img/Measure.png"))));
getToolkit().getImage(GUI.class.getResource("/tec/letsgoing/ardublock/simulator/img/Measure.png"))));
goButton.addActionListener(simu);
stopButton.addActionListener(simu);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment