Issue when adding two JPanels

I’m trying to add two JPanels to a JFrame, one with a simple backround and another one with buttons etc. Either I get only buttons or only the background. I can’t find a solution to my problem …

Repaint() doesn’t work

Somehow repaint doesn’t work when I try to call it. It doesn’t give an error, it looks like it just ignores the whole function. Here is my code: public class Neerslag extends JComponent { JPanel …