When it comes time for the AI to implement a move. What is the best way to go about doing that? Is here a method to move a JLabel to another JPanel or would it be easier to delete the JLabel and create a new one on the other Panel?
Here is my code for creating one piece.
JLabel piece = new JLabel(new ImageIcon("king.png")); JPanel panel = (JPanel)board.getComponent(40); panel.add(piece);