Wednesday, March 11, 2015

Foreground Color Of an Applet Window in java



Get Foreground Color Of an Applet Window

import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
public class GetForgroundColorExample extends Applet
{
public void paint(Graphics g)
{
  Color c = getForeground();
  g.drawString(c.toString(),50,50);
   }
}

No comments:

Post a Comment