paintComponent is not working (Java)
问题 I have been trying to override and use the paint component method instead of the paint method because I've seen it been suggested in multiple questions around here. I've looked through many questions but I still can't seem to get this to work. I'm posting my original piece of code used to render a screen. I am thinking that extending JFrame is not the right way to go and instead I need to extend JPanel, and use paint component from there. I have another object where I actually extend the