custom-painting

Java drawing on JPanel which on a JFrame

Hi I have a JFrame and there are two JPanels on top of it. My intention is to draw on the JPanels. Can anyone please share any Java code? ...