I have been working on building a simple game using JFrame, JLabel, and buttons to execute different commands. However, the problem that I have been encountering is that I am unable to move around items in the JFrame no matter what I do. I am doing this in replit if it makes a difference.
This is what the current code for one of my labels looks like but the setLocation and setBounds do not seem to be working. I've also tried the setX and Y alignment methods but those have not worked either.
ImageIcon darm = new ImageIcon("Sprites/front.png");
JLabel dLabel = new JLabel(front);
Dimension dSize = dLabel.getPreferredSize();
dLabel.setBounds(400, 400, 500, 500);
dLabel.setLocation(400,150);
window.getContentPane().add(dLabel);
dLabel.setVisible(true);
window.setLayout(null);