mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 14:19:44 +02:00
Objekt angepasst
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<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"/>
|
||||
</classpath>
|
||||
|
||||
@@ -6,6 +6,10 @@ import java.io.IOException;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JLabel;
|
||||
|
||||
|
||||
public class Objekt {
|
||||
private static int numberOfInstances;
|
||||
@@ -22,13 +26,13 @@ public class Objekt {
|
||||
*
|
||||
*/
|
||||
|
||||
Objekt(String filename) throws IOException {
|
||||
public Objekt(String filename) throws IOException {
|
||||
numberOfInstances++;
|
||||
objectImage = ImageIO.read(new File(filename));
|
||||
objectLabel = new JLabel(new ImageIcon(objectImage));
|
||||
}
|
||||
|
||||
Objekt(char objectIdentifier) throws IOException {
|
||||
public Objekt(char objectIdentifier) throws IOException {
|
||||
numberOfInstances++;
|
||||
String filename = getImageFilename(objectIdentifier);
|
||||
System.out.println(filename);
|
||||
|
||||
@@ -11,6 +11,9 @@ import javax.swing.BorderFactory;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import de.heatup.objects.Gegner;
|
||||
import de.heatup.objects.Objekt;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user