title: trying to attach a frame to a panel and draw a polygon , but there is no drawin on the frame
body: <p>I'm developing a simple gui using javax.swing and tried to draw some polygons usings command buttons 3 to 9 say if you press command button number 3 it should draw a triangle for you.
  since the source code was a little bit long so I decided to copy it in pastebin.com</p>
  
  <p><a href="http://pastebin.com/R7jhTpee" rel="nofollow">http://pastebin.com/R7jhTpee</a></p>
  
  <p>the funny part is if I create a standalone class and call the paintComponent directly it will draw the things for me but when I want to attach it to another frame it doesn't work.</p>