Problem painting JLabel class to another JPanel class
- by jjpotter
I have created a class that extends JLabel to use as my object moving around a JPanel for a game.
import javax.swing.*;
public class Head extends JLabel {
int xpos;
int ypos;
int xvel;
int yvel;
ImageIcon chickie = new ImageIcon("C:\\Users\\jjpotter.MSDOM1\\Pictures\\clavalle.jpg");
JLabel myLabel = new JLabel(chickie);
public Head(int xpos,…