Home
JAVA APPLET
Creating Simple Banner
Here is an example that Creates simple banner
import java.applet.*; import java.awt.*; public class simplebanner extends Applet { final Font f1= new Font("ARIAL",Font.BOLD,25); final Font f2= new Font("ARIAL",Font.BOLD,20); final Font f3= new Font("ARIAL",Font.PLAIN,15); public void paint(Graphics g) { Dimension d = this.getSize(); g.setColor(Color.black); g.fillRect(0,0,d.width,d.height); g.setFont(f1); g.setColor(Color.red); g.drawString("S O F T W A Y",10,30); g.setFont(f3); g.setColor(Color.green); g.drawString("The means of doing something",10,50); g.setFont(f2); g.setColor(Color.blue); g.drawString("InfoTech Giant Makers",10,80); } }
Previous
Next