2020-06-06 14:01:17 +02:00

22 lines
472 B
Java

package ruscz.game.gameOfProd.Inventory;
import ruscz.game.gameOfProd.Image.ImageCell;
import javax.swing.*;
import java.awt.*;
public class ItemPanel extends JPanel {
ImageCell imageCell;
int item;
public ItemPanel(ImageCell imageCell, int item){
this.imageCell = imageCell;
this.item = item;
}
@Override
public void paint(Graphics g) {
g.drawImage(imageCell.getImagesOfItems().get(item), 0, 0, 32,32, null);
}
}