mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 09:59:45 +02:00
Objekt angepasst
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/OSGi%Minimum-1.2"/>
|
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="output" path="bin"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ import java.io.IOException;
|
|||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.swing.ImageIcon;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
|
||||||
|
|
||||||
public class Objekt {
|
public class Objekt {
|
||||||
private static int numberOfInstances;
|
private static int numberOfInstances;
|
||||||
@@ -22,13 +26,13 @@ public class Objekt {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Objekt(String filename) throws IOException {
|
public Objekt(String filename) throws IOException {
|
||||||
numberOfInstances++;
|
numberOfInstances++;
|
||||||
objectImage = ImageIO.read(new File(filename));
|
objectImage = ImageIO.read(new File(filename));
|
||||||
objectLabel = new JLabel(new ImageIcon(objectImage));
|
objectLabel = new JLabel(new ImageIcon(objectImage));
|
||||||
}
|
}
|
||||||
|
|
||||||
Objekt(char objectIdentifier) throws IOException {
|
public Objekt(char objectIdentifier) throws IOException {
|
||||||
numberOfInstances++;
|
numberOfInstances++;
|
||||||
String filename = getImageFilename(objectIdentifier);
|
String filename = getImageFilename(objectIdentifier);
|
||||||
System.out.println(filename);
|
System.out.println(filename);
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ import javax.swing.BorderFactory;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
|
import de.heatup.objects.Gegner;
|
||||||
|
import de.heatup.objects.Objekt;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user