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); } }