This is my current RectangleComponent class and I add it to a panel in my main JFrame but it never appears. I thought it wasn\'t drawing so I decided to call the paintComponent
No need to pass JPanel to the constructor of RectangleComponent just to get Graphics, and no need to manually call paintComponent. See Painting in AWT and Swing. Check out this example that demonstrates a custom component that paints a rectangle.