So i'm working on a little game in java swing, but I have this problem. when I create the JLabel and add it to a JPanel(where the player is drawn on to). the JLabel is displayed on top of the player but I would like it to be displayed at back. the player is drawn in the paintComponent method, so I'm not sure how to do that. I tried using JLayeredPanel but it didn't work for me.
Does someone know a way to do this? Thanks in advance!