I have to make a rotating rectangle on my applet, how is it done? The rectangle should rotate around one of its conner on the plane. This is what I have so far:
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import javax.swing.JApplet;
public class MainApplet extends JApplet {
    Font bigFont;
     Color redColor; 
     Color weirdColor; 
     Color bgColor;
    @Override
     public void init()  
     { 
          bigFont = new Font("Arial",Font.BOLD,16);
          redColor = Color.red;
          weirdColor = new Color(60,60,122);
      setBackground(bgColor);
     }
    @Override
     public void stop() { }
    @Override
     public void paint(Graphics g)  
     { 
      g.setFont(bigFont); 
      g.drawString("Shapes and Colors",80,20);     
      g.setColor(redColor);
      g.drawRect(100,100,100,100);
      g.fillRect(100,100,100,100);
     }
}
 
     
    