I basically am working on a final project for JAVA and I cant figure out how to move the strings into the paint class. Here are my 2 codes.
import java.util.Scanner;
public class FinalProjectQuestions
{
public static void main(String []args)
{
Scanner in = new Scanner(System.in);
System.out.println("We will design the stick face of your dreams");
System.out.print("Choose gender M for Male, or F for Female: ");
String gender = in.next();
String hair = "";
String haircolor = "";
String eyecolor = "";
String eyesize = "";
String mouthsize = "";
String m = "m";
String m2 = "M";
String femalehair = "";
String femalehaircolor = "";
String femaleeyecolor = "";
String femaleeyesize = "";
String femalemouthsize = "";
String femalemakeup = "";
if (gender.equals(m) || gender == "M")
{
System.out.print("Hair Length, Short, Mediuem, or Long: ");
hair = in.next();
System.out.print("Hair Color, Red, Brown, Blond, Blue, Black, or Purple: ");
haircolor = in.next();
System.out.print("Eye Color, Blue, Red, Brown, or Black: ");
eyecolor = in.next();
System.out.print("Eye size, Big, Small, or Mediuem: ");
eyesize = in.next();
System.out.print("Mouth Size, Big, Small, or Mediem: ");
mouthsize = in.next();
}
else
{
System.out.print("Hair Length, Short, Mediuem, or Long: ");
femalehair = in.next();
System.out.print("Hair Color, Red, Brown, Blond, Blue, Black, or Purple: ");
femalehaircolor = in.next();
System.out.print("Eye Color, Blue, Red, Brown, or Black: ");
femaleeyecolor = in.next();
System.out.print("Eye size, Big, Small, or Mediuem: ");
femaleeyesize = in.next();
System.out.print("Mouth Size, Big, Small, or Mediem: ");
femalemouthsize = in.next();
System.out.print("MakeUp, None, Little, Average, or Tons: ");
femalemakeup = in.next();
}
}
}
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.Ellipse2D;
import javax.swing.JComponent;
public class FinalProjectMale extends JComponent
{
public void paintComponent(Graphics g)
{
Graphics2D g2 = (Graphics2D) g;
Ellipse2D.Double faceshape = new Ellipse2D.Double(100,100,100,100);
}
}
This is where I am lost at, I have no idea how to move strings.