import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.GeneralPath; import java.util.Random; import javax.swing.JPanel; public class Shapes2JPanel extends JPanel { // draw general paths @Override public void paintComponent( Graphics g ) { super.paintComponent( g ); // call superclass's paintComponent Random random = new Random(); // get random number generator // int xPoints[] = { 55, 67, 109, 73, 83, 55, 27, 37, 1, 43 }; // int yPoints[] = { 0, 36, 36, 54, 96, 72, 96, 54, 36, 36 }; int xPoints[] = { 60, 0, 120 }; int yPoints[] = { 0, 60, 60 }; Graphics2D g2d = ( Graphics2D ) g; GeneralPath star = new GeneralPath(); // create GeneralPath object ...