Link to home
Start Free TrialLog in
Avatar of clo1
clo1

asked on

How to create a simple logo using JDK 1.1

I'd like to know how to create a simple logo using JDK 1.1 which the background is white and the front is red. Or I'd like to know how can I convert a gif or jpeg into that !!?
ASKER CERTIFIED SOLUTION
Avatar of mjenkins
mjenkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of clo1
clo1

ASKER

Thanks for your time to think about it.
Avatar of clo1

ASKER

Hi, I have created the logo. And here is my sourse code. Can you tell me how to fill in the logo with red color, and the background is white? Thanks in advance !!!! Also, if you want to check the output for this logo. You can go to www.uwinnipeg.ca/~clo1/java/Logo.html

------------------------------------------------------------------------------------------------------------------

import java.awt.*;                        // import needed packages
import java.applet.*;

public class Logo extends Applet            // define a class
{
      public void paint(Graphics g)            // simple method
      {
            setBackground(Color.white);
            
            g.setColor(Color.red);

            g.drawLine(15, 90, 60, 40);
            g.drawLine(15, 90, 100, 90);
            g.drawArc(60, 1, 40, 80, 180, 180);
            g.drawLine(100, 40, 165, 40);
            g.drawLine(100, 90, 130, 50);
            g.drawLine(130, 50, 130, 90);
            g.drawLine(130, 90, 165, 40);
      }
}
Draw it as a polygon, and use Graphics.fillPolygon()