This content has been marked as final. Show 2 replies
anyone can give me a solution with sample code.This is a forum, not a code factory. Recommended reading: How to ask questions the smart way
Classes that may be useful to you: implementations of java.awt.Shape, particularly Rectangle/Rectangle2D and Polygon, and/or java.awt.GradientPaint. For animation, javax.swing.Timer.