Drawing shapes on the JPanel, not working properly

Printable View