Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 11 of 11

Thread: help for noobs

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help for noobs

    Ok, here's the deal. we need help. a lot of help. our teacher will no longer help us on our project, and we don't understand why our code wont work. our code is long and tedious because of our teacher, and we cannot shorten it at all. we need help for why it is not working. it will run, not throw any codes, but it will not actually work. we have a page of buttons, and when you click on a button, it is supposed to pull up a slide with a state's information. thats it. nice and simple. why wont it work? here is the code.


    import java.awt.*;
    import java.applet.*;
     
     
    public class FinalProjectst extends Applet
    {
        Image picture1, picture2, picture3, picture4, picture5, picture6, picture7, picture8,
        picture9, picture10, picture11, picture12, picture13, picture14, picture15, picture16, picture17, 
        picture18, picture19, picture20, picture21, picture22, picture23, picture24, picture25, picture26,
        picture27, picture28, picture29, picture30, picture31, picture32, picture33, picture34, picture35, 
        picture36, picture37, picture38, picture39, picture40, picture41, picture42, picture43, picture44, 
        picture45, picture46, picture47, picture48, picture49, picture50; 
        Rectangle AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC;
    	int numColor;
    	//Graphics(g);
     
        public void init ()
        {
        	picture1 = getImage(getDocumentBase(),"AlabamaYellowHammer");
        	picture2 = getImage(getDocumentBase(),"AlaskaWhitePtarmigan");
        	picture3 = getImage(getDocumentBase(),"ArizonaCactusWren");
        	picture4= getImage(getDocumentBase(),"ArkansasMockingBird");
        	picture5 = getImage(getDocumentBase(),"CaliforniaValleyQuail");
        	picture6 = getImage(getDocumentBase(),"ColoradoLarkFinch");
        	picture7 = getImage(getDocumentBase(),"ConnecticutAmericanRobin");
        	picture8 = getImage(getDocumentBase(),"DelawareBlueHenChicken");
        	picture9 = getImage(getDocumentBase(),"FloridaCommonMockingBird");
        	picture10 = getImage(getDocumentBase(),"GeorgiaBrownThrasher");
        	picture11 = getImage(getDocumentBase(),"HawaiiNene");
        	picture12 = getImage(getDocumentBase(),"IdahoArcticBlueBird");
        	picture13 = getImage(getDocumentBase(),"IllinoisCardinal");
        	picture14 = getImage(getDocumentBase(),"IndianaCardinal");
        	picture15 = getImage(getDocumentBase(),"IowaEasternGoldFinch");
        	picture16 = getImage(getDocumentBase(),"KansasMeadowLark");
        	picture17 = getImage(getDocumentBase(),"KentuckyCardinal");
        	picture18 = getImage(getDocumentBase(),"LouisianaBrownPelican");
        	picture19 = getImage(getDocumentBase(),"MaineChickadee");
        	picture20 = getImage(getDocumentBase(),"MarylandBaltimoreOriole");
        	picture21 = getImage(getDocumentBase(),"MassachusettsChickadee");
        	picture22 = getImage(getDocumentBase(),"MichiganRobin");
        	picture23 = getImage(getDocumentBase(),"MinnesotaLoon");
        	picture24 = getImage(getDocumentBase(),"MississippiMockingBird");
        	picture25 = getImage(getDocumentBase(),"MissouriBlueBird");
        	picture26 = getImage(getDocumentBase(),"MontanaWesternMeadowLark");
        	picture27 = getImage(getDocumentBase(),"NebraskaWesternMeadowLark");
        	picture28 = getImage(getDocumentBase(),"NevadaMountainBlueBird");
        	picture29 = getImage(getDocumentBase(),"NewHampshirePurpleFinch");
        	picture30 = getImage(getDocumentBase(),"NewJerseyAmericanGoldFinch");
        	picture31 = getImage(getDocumentBase(),"NewMexicoRoadRunner");
        	picture32 = getImage(getDocumentBase(),"NewYorkBlueBird");
        	picture33 = getImage(getDocumentBase(),"NorthCarolinaCardinal");
        	picture34 = getImage(getDocumentBase(),"NorthDakotaWesternMeadowlark");
        	picture35 = getImage(getDocumentBase(),"OhioCardinal");
        	picture36 = getImage(getDocumentBase(),"OklahomaScissorTailedFlyCatcher");
        	picture37 = getImage(getDocumentBase(),"OregonWesternMeadowlark");
        	picture38 = getImage(getDocumentBase(),"PenssylvaniaRuffedGrouse");
        	picture39 = getImage(getDocumentBase(),"RhodeIslandRed");
        	picture40 = getImage(getDocumentBase(),"SouthCarolinaGreatCarolinaWren");
        	picture41 = getImage(getDocumentBase(),"SouthDakotaRingNeckedPheasant");
        	picture42 = getImage(getDocumentBase(),"TennesseeMockingBird");
        	picture43 = getImage(getDocumentBase(),"TexasMockingBird");
        	picture44 = getImage(getDocumentBase(),"UtahAmericanGull");
        	picture45 = getImage(getDocumentBase(),"VermontHermitThrush");
        	picture46 = getImage(getDocumentBase(),"VirginiaCardinal");
        	picture47 = getImage(getDocumentBase(),"WashingtonAmericanGoldFinch");
        	picture48 = getImage(getDocumentBase(),"WestVirginiaCardinal");
        	picture49 = getImage(getDocumentBase(),"WisconsinRobin");
        	picture50 = getImage(getDocumentBase(),"WyomingWesternMeadowlark");
     
        	AL = new Rectangle(1,75,100,75);
    		AK = new Rectangle(1,150,100,75);
    		AZ = new Rectangle(1,225,100,75);
    		AR = new Rectangle(1,300,100,75);
    		CA = new Rectangle(1,375,100,75);
    		CO = new Rectangle(1,450,100,75);
    		CT = new Rectangle(1,525,100,75);
    		DE = new Rectangle(1,600,100,75);
    		FL = new Rectangle(125,75,100,75);
    		GA = new Rectangle(125,150,100,75);
    		HI = new Rectangle(125,225,100,75);
    		ID = new Rectangle(125,300,100,75);
    		IL = new Rectangle(125,375,100,75);
    		IN = new Rectangle(125,450,100,75);
    		IA = new Rectangle(125,525,100,75);
    		KS = new Rectangle(125,600,100,75);
    		KY = new Rectangle(250,75,100,75);
    		LA = new Rectangle(250,150,100,75);
    		ME = new Rectangle(250,225,100,75);
    		MD = new Rectangle(250,300,100,75);
    		MA = new Rectangle(250,375,100,75);
    		MI = new Rectangle(250,450,100,75);
    		MN = new Rectangle(250,525,100,75);
    		MS = new Rectangle(250,600,100,75);
    		MO = new Rectangle(375,75,100,75);
    		MT = new Rectangle(375,150,100,75);
    		NE = new Rectangle(375,225,100,75);
    		NV = new Rectangle(375,300,100,75);
    		NH = new Rectangle(375,375,100,75);
    		NJ = new Rectangle(375,450,100,75);
    		NM = new Rectangle(375,525,100,75);
    		NY = new Rectangle(375,600,100,75);
    		NC = new Rectangle(500,75,100,75);
    		ND = new Rectangle(500,150,100,75);
    		OH = new Rectangle(500,225,100,75);
    		OK = new Rectangle(500,300,100,75);
    		OR = new Rectangle(500,375,100,75);
    		PA = new Rectangle(500,450,100,75);
    		RI = new Rectangle(500,525,100,75);
    		SC = new Rectangle(500,600,100,75);
     
        }
     
    	public void paint(Graphics g)
    	{
         Expo.setColor(g,Expo.black);
    		g.setFont(new Font("Times Roman",Font.BOLD,25));
    //		g.drawString("Click on any State's Box to Learn About Their State Bird!",10,25);
    		Expo.drawRectangle(g,1,75,100,125);
    		g.setFont(new Font("Arial",Font.BOLD,20));
    		g.drawString("Alabama",1,110);
    		Expo.drawRectangle(g,1,150,100,200);
    		g.drawString("Alaska",1,175);
    		Expo.drawRectangle(g,1,225,100,275);
    		g.drawString("Arizona",1,250);
    		Expo.drawRectangle(g,1,300,100,350);
    		g.drawString("Arkansas",1,325);
    		Expo.drawRectangle(g,1,375,100,425);						//5
    		g.drawString("California",1,400);
    		Expo.drawRectangle(g,1,450,100,500);
    		g.drawString("Colorado",1,475);
    		Expo.drawRectangle(g,1,525,115,575);
    		g.drawString("Connecticut",1,550);
    		Expo.drawRectangle(g,1,600,100,649);
    		g.drawString("Delaware",1,625);						//Here up is the first row
    		Expo.drawRectangle(g,125,75,225,125);
    		g.drawString("Florida",125,100);
    		Expo.drawRectangle(g,125,150,225,200);
    		g.drawString("Georgia",125,175);
    		Expo.drawRectangle(g,125,225,225,275);
    		g.drawString("Hawaii",125,250);
    		Expo.drawRectangle(g,125,300,225,350);
    		g.drawString("Idaho",125,325);
    		Expo.drawRectangle(g,125,375,225,425);
    		g.drawString("Illinois",125,400);
    		Expo.drawRectangle(g,125,450,225,500);
    		g.drawString("Indiana",125,475);
    		Expo.drawRectangle(g,125,525,225,575);
    		g.drawString("Iowa",125,550);
    		Expo.drawRectangle(g,125,600,225,649);
    		g.drawString("Kansas",125,625);							//2nd row
    		Expo.drawRectangle(g,250,75,400,125);
    		g.drawString("Kentucky",250,100);
    		Expo.drawRectangle(g,250,150,400,200);					
    		g.drawString("Louisiana",250,175);
    		Expo.drawRectangle(g,250,225,400,275);
    		g.drawString("Maine",250,250);
    		Expo.drawRectangle(g,250,300,400,350);
    		g.drawString("Maryland",250,325);
    		Expo.drawRectangle(g,250,375,400,425);
    		g.drawString("Massachusetts",250,400);
    		Expo.drawRectangle(g,250,450,400,500);
    		g.drawString("Michigan",250,475);
    		Expo.drawRectangle(g,250,525,400,575);					
    		g.drawString("Minnesota",250,550);
    		Expo.drawRectangle(g,250,600,400,649);
    		g.drawString("Mississippi",250,625);					//3rd row
     		Expo.drawRectangle(g,425,75,550,125);
     		g.drawString("Missouri",425,100);
     		Expo.drawRectangle(g,425,150,550,200);
     		g.drawString("Montana",425,175);
     		Expo.drawRectangle(g,425,225,550,275);
     		g.drawString("Nebraska",425,250);
     		Expo.drawRectangle(g,425,300,562,350);
     		g.drawString("Nevada",425,325);
     		Expo.drawRectangle(g,425,375,550,425);
     		g.drawString("New Hampshire",425,400);
     		Expo.drawRectangle(g,425,450,550,500);
     		g.drawString("New Jersey",425,475);
     		Expo.drawRectangle(g,425,525,550,575);
     		g.drawString("New Mexico",425,550);
     		Expo.drawRectangle(g,425,600,550,649);				//end of 4th row
     		g.drawString("New York",425,625);
     		Expo.drawRectangle(g,575,75,700,125);
     		g.drawString("North Carolina",575,100);
     		Expo.drawRectangle(g,575,150,700,200);
     		g.drawString("North Dakota",575,175);
     		Expo.drawRectangle(g,575,225,715,275);
     		g.drawString("Ohio",575,250);
     		Expo.drawRectangle(g,575,300,710,350);
     		g.drawString("Oklahoma",575,325);
     		Expo.drawRectangle(g,575,375,700,425);
     		g.drawString("Oregon",575,400);
     		Expo.drawRectangle(g,575,450,700,500);
     		g.drawString("Pennsylvania",575,475);
     		Expo.drawRectangle(g,575,525,700,575);
     		g.drawString("Rhode Island",575,550);
     		Expo.drawRectangle(g,575,600,700,649);				//end of 5th row
     		g.drawString("South Carolina",575,625);
     		Expo.drawRectangle(g,900,350,999,400);
     		g.drawString("Next",900,375);
     
     
     
     
     
     
     
        switch (numColor)
        {
        	case 1:
        		Expo.setColor(g,Expo.black);
        		alabama(g);
        		break;
        	case 2:
        		g.drawString("Mouse clicked inside Alaska",50,50);
        		break;
        	case 3:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Arizona ",50,50);
        		break;
        	case 4:
        		g.drawString("Mouse clicked inside Arkansas",50,50);
        		break;
        	case 5:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside California", 50,50);
        		break;
        	case 6:
        		g.drawString("Mouse clicked inside Colorado ",50,50);
        		break;
        	case 7:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Connecticut ", 50,50);
        		break;
        	case 8:
        		g.drawString("Mouse clicked inside Delaware ",50,50);
        		break;
        	case 9:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Florida ", 50,50);
        		break;
        	case 10:
        		g.drawString("Mouse clicked inside Georgia ",50,50);
        		break;
        	case 11:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Hawaii ", 50,10);
        		break;
        	case 12:
        		g.drawString("Mouse clicked inside Idaho ",50,20);
        		break;
        	case 13:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Illinois ", 50,10);
        		break;
        	case 14:
        		g.drawString("Mouse clicked inside Indiana ",50,20);
        		break;
        	case 15:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Iowa", 50,10);
        		break;
        	case 16:
        		g.drawString("Mouse clicked inside Kansas ",50,20);
        		break;
        	case 17:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Kentucky ", 50,10);
        		break;
        	case 18:
        		g.drawString("Mouse clicked inside Louisiana",50,20);
        		break;
        	case 19:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Maine ", 50,10);
        		break;
        	case 20:
        		g.drawString("Mouse clicked inside Maryland ",50,20);
        		break;
        	case 21:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Massachusetts ", 50,10);
        		break;
        	case 22:
        		g.drawString("Mouse clicked inside Michigan ",50,20);
        		break;
        	case 23:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Minnesota ", 50,10);
        		break;
        	case 24:
        		g.drawString("Mouse clicked inside Mississippi ",50,20);
        		break;
        	case 25:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Missouri ", 50,10);
        		break;
        	case 26:
        		g.drawString("Mouse clicked inside Montana ",50,20);
        		break;
        	case 27:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Nebraska ", 50,10);
        		break;
        	case 28:
        		g.drawString("Mouse clicked inside Nevada ",50,20);
        		break;
        	case 29:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside New Hampshire", 50,10);
        		break;
        	case 30:
        		g.drawString("Mouse clicked inside New Jersey",50,20);
        		break;
        	case 31:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside New Mexico", 50,10);
        		break;
        	case 32:
        		g.drawString("Mouse clicked inside New York",50,20);
        		break;
        	case 33:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside North Carolina", 50,10);
        		break;
        	case 34:
        		g.drawString("Mouse clicked inside North Dakota",50,20);
        		break;
        	case 35:
        		g.drawString("Mouse clicked inside Ohio ",50,20);
        		break;
        	case 36:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Oklahoma ", 50,10);
        		break;
        	case 37:
        		g.drawString("Mouse clicked inside Oregon ",50,20);
        		break;
        	case 38:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked inside Pennsylvania ", 50,10);
        		break;
        	case 39:
        		g.drawString("Mouse clicked inside Rhode Island",50,20);
        		break;
        	case 40:
        		g.drawString("Mouse clicked inside South Carolina",50,25);
        		break;		
     
        	case 41:
        		Expo.setColor(g,Expo.black);
        		g.drawString("Mouse clicked outside box.", 150,150);
        		break;	
        }
    	}
         	public boolean mouseDown(Event e, int x, int y, Graphics g)
    	{
    		if(AL.inside(x,y))
    		{	numColor = 1;
    		//	alabama(g);
    			}
    		else if(AK.inside(x,y))
    		{numColor = 2;
    			alaska(g);
    		}
    		else if(AZ.inside(x,y))
    		{	numColor = 3;
    			arizona(g);}
    		else if(AR.inside(x,y))
    		{	numColor = 4;
    			arkansas(g);}
    		else if(CA.inside(x,y))
    		{	numColor = 5;
    			california(g);}
    		else if(CO.inside(x,y))
    		{	numColor = 6;
    			colorado(g);}
    		else if(CT.inside(x,y))
    		{	numColor = 7;
    			connecticut(g);}
    		else if(DE.inside(x,y))
    		{	numColor = 8;				
    			delaware(g);	}
    		else if(FL.inside(x,y))
    		{	numColor = 9;
    			florida(g);}
    		else if(GA.inside(x,y))
    		{	numColor = 10;	
    			georgia(g);}	
    		else if(HI.inside(x,y))
    		{	numColor = 11;
    			hawaii(g);}
    		else if(ID.inside(x,y))
    		{	numColor = 12;
    			idaho(g);}
    		else if(IL.inside(x,y))
    		{	numColor = 13;
    			illinois(g);}
    		else if(IN.inside(x,y))
    		{	numColor = 14;
    			indiana(g);}
    		else if(IA.inside(x,y))
    		{	numColor = 15;
    			iowa(g);}
    		else if(KS.inside(x,y))
    		{	numColor = 16;
    			kansas(g);}
    		else if(KY.inside(x,y))
    		{	numColor = 17;
    			kentucky(g);
    			}
    		else if(LA.inside(x,y))
    		{	numColor = 18;
    			louisiana(g);}
    		else if(ME.inside(x,y))
    		{	numColor = 19;
    			maine(g);}
    		else if(MD.inside(x,y))
    		{	numColor = 20;
    			maryland(g);}
    		else if(MA.inside(x,y))
    		{	numColor = 21;
    			massachusetts(g);}
    		else if(MI.inside(x,y))
    		{	numColor = 22;
    			michigan(g);}
    		else if(MN.inside(x,y))
    		{	numColor = 23;
    			minnesota(g);}
    		else if(MS.inside(x,y))
    		{	numColor = 24;
    			mississippi(g);}
    		else if(MO.inside(x,y))
    		{	numColor = 25;
    			missouri(g);}
    		else if(MT.inside(x,y))
    		{	numColor = 26;
    			montana(g);}
    		else if(NE.inside(x,y))
    		{	numColor = 27;
    			nebraska(g);}
    		else if(NV.inside(x,y))
    		{	numColor = 28;
    			nevada(g);}
    		else if(NH.inside(x,y))
    		{	numColor = 29;
    			newhampshire(g);}
    		else if(NJ.inside(x,y))
    		{	numColor = 30;
    			newjersey(g);}
    		else if(NM.inside(x,y))
    		{	numColor = 31;
    			newmexico(g);}
    		else if(NY.inside(x,y))
    		{	numColor = 32;
    			newyork(g);}
    		else if(NC.inside(x,y))
    		{	numColor = 33;
    			northcarolina(g);}
    		else if(ND.inside(x,y))
    		{	numColor = 34;
    			northdakota(g);}
    		else if(OH.inside(x,y))
    		{	numColor = 35;
    			ohio(g);}
    		else if(OK.inside(x,y))
    		{	numColor = 36;
    			oklahoma(g);}
    		else if(OR.inside(x,y))
    		{	numColor = 37;
    			oregon(g);}
    		else if(PA.inside(x,y))
    		{	numColor = 38;
    			penssylvania(g);}
    		else if(RI.inside(x,y))
    		{	numColor = 39;
    			rhodeisland(g);}
    		else if(SC.inside(x,y))
    		{	numColor = 40;
    			southcarolina(g);}																										
    		repaint();
    		return true;
    	}	
     
     
     
    	public void alabama(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Alabama - Yellow Hammer",200,50);
    	g.drawImage(picture1,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("This species, which is usually called Pique-bois jaune by the French settlers in Louisiana",50,200);
    	g.drawString("and receives the name of High-holder, Yucker, and Flicker in other parts of the Union, being",50,220);
    	g.drawString("seldom or never graced with the epithet Golden-winged, employed by naturalists, is one of",50,240);
    	g.drawString("the most lively of our birds, and is found over the whole of the United States.",50,260);
    	Expo.drawRectangle(g,0,500,100,599);
    	}
     
    	public void alaska(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Alaska - White Ptarmigan",200,50);
    	g.drawImage(picture2,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Willow Ptarmigan  join their broods whenever an opportunity offers of all different sizes.",50,200);
    	g.drawString("This species rarely if ever alights on bushes or trees after being frilly grown,",50,220);
    	g.drawString("and appears to resort at all times by preference to the ground, living among the ",50,240);
    	g.drawString("naked rocks of the open morasses.",50,260);
    	}
     
    	public void arizona(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Arizona - Cactus Wren",200,50);
    	g.drawImage(picture3,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Arizona's state bird, the Cactus Wren is seven to eight inches long and likes to build nests",50,200);
    	g.drawString(" in the protection of thorny desert plants like the arms of the giant saguaro cactus.",50,220);
    	}
     
    	public void arkansas(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Arkansas - Mockingbird",200,50);
    	g.drawImage(picture4,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Name of the mockingbird family is Mimidae, from the Latin mimus, meaning “mimic” or “imitator.”",50,200);
    	g.drawString("The family includes the catbirds and thrashers. The name of the common mockingbird is Mimus polyglottos.",50,220);
    	g.drawString("The common mockingbird ranges from the northern United States to Mexico and the West Indies",50,240);
    	}
     
    	public void california(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("California - Valley Quail",200,50);
    	g.drawImage(picture5,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The California quail (Lophortyx californica), also known as the valley quail, became the ",50,200);
    	g.drawString("official state bird in 1931. A widely distributed and prized game bird, it is known ",50,220);
    	g.drawString("for its hardiness and adaptability. Plump, gray-colored and smaller than a pigeon, the ",50,240);
    	g.drawString("California quail sports a downward curving black plume on top of its head and black bib with white stripe under the beak.",50,260);
    	}
     
    	public void colorado(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Colorado - Lark Finch",200,50);
    	g.drawImage(picture6,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Prairie Finch inhabits a portion of the Platte country, in large flocks.",50,200);
    	g.drawString("It is strictly gregarious, and feeds upon the ground, along which it runs like ",50,220);
    	g.drawString("the Grass Finch, Fringilla graminea.",50,240);
    	}
     
    	public void connecticut(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Connecticut - American Robin",200,50);
    	g.drawImage(picture7,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The quintessential early bird, American Robins are common sights on lawns across North America,",50,200);
    	g.drawString("where you often see them tugging earthworms out of the ground. Robins are popular birds for",50,220);
    	g.drawString("their warm orange breast, cheery song, and early appearance at the end of winter.",50,240);
    	}
     
    	public void delaware(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Delaware - Blue Hen Chicken",200,50);
    	g.drawImage(picture8,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Delaware state bird, the Blue Hen Chicken, is a domestic bird (chicken) and therefore has no place in ",50,200);
    	g.drawString("Audubon's Birds of America, which is comprised exclusively of wild birds native to North America. ",50,220);
    	g.drawString("During the Revolutionary War, the men of Captain Jonathan Caldwell's company, recruited in Kent County",50,240);
    	g.drawString("took with them game chickens that were said to be of the brood of a famous Blue Hen and were noted for their fighting ability.",50,260);
    	}
     
    	public void florida(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Florida - Common Mockingbird",200,50);
    	g.drawImage(picture9,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Name of the mockingbird family is Mimidae, from the Latin mimus, meaning “mimic” or “imitator.”",50,200);
    	g.drawString("The family includes the catbirds and thrashers. The name of the common mockingbird is Mimus polyglottos.",50,220);
    	g.drawString("The common mockingbird ranges from the northern United States to Mexico and the West Indies.",50,240);
    	}
     
    	public void georgia(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Georgia - Brown Thrasher",200,50);
    	g.drawImage(picture10,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("A large, skulking bird of thickets and hedgerows, the Brown Thrasher has one of the largest song ",50,200);
    	g.drawString("repertoires of any North American bird. Boldly patterned, it is conspicuous when singing on it's territory",50,220);
    	g.drawString("but is hardly discernable during the rest of year. ",50,240);
    	}
     
    	public void hawaii(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Hawaii - Nene",200,50);
    	g.drawImage(picture11,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Nene (pronounced nay-nay) is a land bird and a variety of Hawaiian Goose.",50,200);
    	g.drawString("It has adapted itself to life in the harsh lava country by transforming its webbed ",50,220);
    	g.drawString("feet into a claw-like shape and modifying its wing structure for shorter flights.",50,240);
    	}
     
    	public void idaho(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Idaho - Western Bluebird",200,50);
    	g.drawImage(picture12,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Western Bluebird is a common sight in parklands of the West. Unlike the other species of bluebirds,",50,200);
    	g.drawString("it does not like large meadows, preferring open forests instead.",50,220);
    	}
     
    	public void illinois(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Illinois - Cardinal",200,50);
    	g.drawImage(picture13,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking",50,200);
    	g.drawString("in winter’s snowy backyards. In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void indiana(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Indiana - Cardinal",200,50);
    	g.drawImage(picture14,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking",50,200);
    	g.drawString("in winter’s snowy backyards. In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void iowa(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Iowa - Eastern Goldfinch",200,50);
    	g.drawImage(picture15,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("This species merely passes over the State of Louisiana in the beginning of January, and at that season is seen ",50,200);
    	g.drawString("there for only a few days, alighting on the highest tops of trees near water-courses, in small groups of eight or ",50,220);
    	g.drawString("ten, males and females together. They feed at that period on the opening buds of maples, and others ",50,240);
    	g.drawString("that are equally tender and juicy.",50,260);
    	}
     
    	public void kansas(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Kansas - Meadowlark",200,50);
    	g.drawImage(picture16,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The clear, melodious whistles of the Eastern Meadowlark are a familiar and welcome sound across farms and ",50,200);
    	g.drawString("grasslands in eastern North America. Eastern and Western meadowlarks are closely related; the two species are ",50,220);
    	g.drawString("very difficult to distinguish except by voice and location, but they do not readily hybridize where their ranges meet.",50,240);
    	}
     
    	public void kentucky(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Kentucky - Cardinal",200,50);
    	g.drawImage(picture17,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking in ",50,200);
    	g.drawString("winter’s snowy backyards. In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void louisiana(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Louisiana - Brown Pelican",200,50);
    	g.drawImage(picture18,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Unique among the world's seven species of pelicans, the Brown Pelican is found along the ocean shores",50,200);
    	g.drawString("and on only a few inland lakes in the southwestern U.S. It is the only dark pelican, and also the only one ",50,220);
    	g.drawString("that plunges from the air into the water to catch its food.",50,240);
    	}
     
    	public void maine(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Maine - Chickadee",200,50);
    	g.drawImage(picture19,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString(" A bird almost universally considered “cute” thanks to its oversized round head, tiny body, and curiosity about everything,",50,200);
    	g.drawString("including humans. The chickadee’s black cap and bib; white cheeks; gray back, wings, and tail; and whitish underside ",50,220);
    	g.drawString("with buffy sides are distinctive. Its habit of investigating people and everything else in its home territory",50,240);
    	}
     
    	public void maryland(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Maryland - Baltimore Oriole",200,50);
    	g.drawImage(picture20,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("With its brilliant orange and black plumage, the Baltimore Oriole's arrival is eagerly awaited by birders ",50,200);
    	g.drawString("each spring migration. Its preference for open areas with tall trees has made it a common inhabitant ",50,220);
    	g.drawString("of parks and suburban areas.",50,240);
    	}
     
    	public void massachusetts(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Massachusetts - Chickadee",200,50);
    	g.drawImage(picture21,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("A bird almost universally considered “cute” thanks to its oversized round head, tiny body, and curiosity about everything,",50,200);
    	g.drawString("including humans. The chickadee’s black cap and bib; white cheeks; gray back, wings, and tail; and whitish underside",50,220);
    	g.drawString("with buffy sides are distinctive. Its habit of investigating people and everything else in its home territory, and",50,240);
    	g.drawString("quickness to discover bird feeders, make it one of the first birds most people learn.",50,260);
    	}
     
    	public void michigan(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Michigan - Robin",200,50);
    	g.drawImage(picture22,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The quintessential early bird, American Robins are common sights on lawns across North America, where you often see them ",50,200);
    	g.drawString("tugging earthworms out of the ground. Robins are popular birds for their warm orange breast, cheery",50,220);
    	g.drawString("song, and early appearance at the end of winter.",50,240);
    	}
     
    	public void minnesota(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Minnesota - Loon",200,50);
    	g.drawImage(picture23,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The eerie yodel of the Common Loon is a symbol of the wild North",50,200);
    	g.drawString("The territorial call of the male loon can be heard from lakes across Canada to the very northern United States",50,220);
    	}
     
    	public void mississippi(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Mississippi - Mockingbird",200,50);
    	g.drawImage(picture24,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Name of the mockingbird family is Mimidae, from the Latin mimus, meaning “mimic” or “imitator.”",50,200);
    	g.drawString("The family includes the catbirds and thrashers. The name of the common mockingbird is Mimus polyglottos.",50,220);
    	g.drawString("The common mockingbird ranges from the northern United States to Mexico and the West Indies.",50,240);
    	}
     
    	public void missouri(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Missouri - Bluebird",200,50);
    	g.drawImage(picture25,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Most of the country drives during an eastern North American summer will turn up a few Eastern Bluebirds sitting on",50,200);
    	g.drawString("telephone wires or perched atop a nest box, calling out in a short, wavering voice or abruptly dropping to the ground after an insect.",50,220);
    	g.drawString("Marvelous birds to capture in your binoculars, male Eastern Bluebirds are a brilliant royal blue on the back and head,",50,240);
    	g.drawString("and warm red-brown on the breast. Blue tinges in the wings and tail give the grayer females an elegant look.",50,260);
    	}
     
    	public void montana(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Montana - Western Meadowlark",200,50);
    	g.drawImage(picture26,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("An abundant and familiar bird of open country across the western two-thirds of the continent, the Western",50,200);
    	g.drawString("Meadowlark is beloved for its melodic song. It is frequently seen singing atop fenceposts along ",50,220);
    	g.drawString("roadsides in native grassland and agricultural areas.",50,240);
    	}
     
    	public void nebraska(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Nebraska - Western Meadowlark",200,50);
    	g.drawImage(picture27,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("An abundant and familiar bird of open country across the western two-thirds of the continent, the Western",50,200);
    	g.drawString("Meadowlark is beloved for its melodic song. It is frequently seen singing atop fenceposts along",50,220);
    	g.drawString("roadsides in native grassland and agricultural areas. ",50,240);
    	}
     
    	public void nevada(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Nevada - Mountain Bluebird",200,50);
    	g.drawImage(picture28,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("A common sight in ranchland and other open areas of the American West, the male Mountain Bluebird is",50,200);
    	g.drawString("a breathtaking brilliant sky blue. It prefers more open habitats than the other bluebirds and",50,220);
    	g.drawString("can be found in colder habitats in winter.",50,240);
    	}
     
    	public void newhampshire(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("New Hampshire - Purple Finch",200,50);
    	g.drawImage(picture29,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Purple Finch is the bird that Roger Tory Peterson famously described as a “sparrow dipped in raspberry juice.”",50,200);
    	g.drawString("For many of us, they’re irregular winter visitors to our feeders, although these chunky, big-beaked finches do breed in",50,220);
    	g.drawString("northern North America and the West Coast. Separating them from House Finches requires a careful look,",50,240);
    	g.drawString("but the reward is a delicately colored, cleaner version of that red finch.",50,260);
    	}
     
    	public void newjersey(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("New Jersey - American Goldfinch",200,50);
    	g.drawImage(picture30,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("This handsome little finch, the state bird of New Jersey, Iowa, and Washington, is welcome and common at feeders,",50,200);
    	g.drawString(", where it takes primarily sunflower and nyjer. Goldfinches often flock with Pine Siskins and",50,220);
    	g.drawString("Common Redpolls. Spring males are brilliant yellow and shiny black with a bit of white.",50,240);
    	}
     
    	public void newmexico(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("New Mexico - Roadrunner",200,50);
    	g.drawImage(picture31,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Greater Roadrunner is a signature bird of the desert Southwest. During the 20th century,",50,200);
    	g.drawString("its range expanded all the way to southern Missouri and western Louisiana. A ground-dwelling cuckoo,",50,220);
    	g.drawString("it feeds on snakes, scorpions, and any other small animal it can catch and subdue. ",50,240);
    	}
     
    	public void newyork(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("New York - Bluebird",200,50);
    	g.drawImage(picture32,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Most of the country drives during an eastern North American summer will turn up a few Eastern Bluebirds sitting on telephone wires",50,200);
    	g.drawString("wires or perched atop a nest box, calling out in a short, wavering voice or abruptly dropping to the ground after an insect.",50,220);
    	g.drawString("Marvelous birds to capture in your binoculars, male Eastern Bluebirds are a brilliant royal blue on the back and head,",50,240);
    	g.drawString("and warm red-brown on the breast. Blue tinges in the wings and tail give the grayer females an elegant look.",50,260);
    	}
     
    	public void northcarolina(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("North Carolina - Cardinal",200,50);
    	g.drawImage(picture33,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking in winter’s",50,200);
    	g.drawString("snowy backyards. In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void northdakota(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("North Dakota - Western Meadowlark",200,50);
    	g.drawImage(picture34,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("An abundant and familiar bird of open country across the western two-thirds of the continent, the Western",50,200);
    	g.drawString("Meadowlark is beloved for its melodic song. It is frequently seen singing atop fenceposts along roadsides",50,220);
    	g.drawString("in native grassland and agricultural areas.",50,240);
    	}
     
    	public void ohio(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Ohio - Cardinal",200,50);
    	g.drawImage(picture35,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking in winter’s snowy backyards.",50,200);
    	g.drawString("In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void oklahoma(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Oklahoma - Scissor-Tailed Flycatcher",200,50);
    	g.drawImage(picture36,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("A striking bird of the central United States, the Scissor-tailed Flycatcher is nearly unmistakable",50,200);
    	g.drawString("with its long forked tail and salmon-pink belly. The state bird of Oklahoma, it is commonly found in only a handful of other states.",50,220);
    	}
     
    	public void oregon(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Oregon - Western Meadowlark",200,50);
    	g.drawImage(picture37,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("An abundant and familiar bird of open country across the western two-thirds of the continent, the Western",50,200);
    	g.drawString("Meadowlark is beloved for its melodic song. It is frequently seen singing atop fenceposts along roadsides",50,220);
    	g.drawString("in native grassland and agricultural areas.",50,240);
    	}
     
    	public void penssylvania(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Penssylvania - Ruffed Grouse",200,50);
    	g.drawImage(picture38,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Many people's first experience with the Ruffed Grouse is when it explodes from the forest floor in a flurry",50,200);
    	g.drawString("of wings. Often, it's gone before they can turn around. The grouse's cryptic coloration",50,220);
    	g.drawString("and slow, deliberate walk make it virtually invisible.",50,240);
    	}
     
    	public void rhodeisland(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Rhode Island - Red",200,50);
    	g.drawImage(picture39,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Rhode Island Red Hen became Rhode Island's official state bird on May 3, 1954. The Rhode Island",50,200);
    	g.drawString("state bird, the Rhode Island Red, is a domestic bird (chicken) and therefore has no place in Audubon's",50,220);
    	g.drawString("Birds of America, which is comprised exclusively of wild birds native to North America",50,240);
    	}
     
    	public void southcarolina(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("South Carolina - Great Carolina Wren",200,50);
    	g.drawImage(picture40,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Singing one of the loudest songs per volume of bird, the Carolina Wren's tea-kettle, tea-kettle, tea-kettle",50,200);
    	g.drawString("is familiar across the Southeast. It is a common bird in urban areas, and is more likely to nest in",50,220);
    	g.drawString("a hanging plant than in a birdhouse.",50,240);
    	}
     
    	public void southdakota(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("South Dakota - Ringnecked Pheasant",200,50);
    	g.drawImage(picture41,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The Ring-necked Pheasant was introduced into North America from Asia and is established over",50,200);
    	g.drawString("much of the continent, especially in agricultural lands. It is a distinctive and colorful species",50,220);
    	g.drawString("and is a popular game bird.",50,240);
    	}
     
    	public void tennessee(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Tennessee - Mockingbird",200,50);
    	g.drawImage(picture42,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Name of the mockingbird family is Mimidae, from the Latin mimus, meaning “mimic” or “imitator.”",50,200);
    	g.drawString("The family includes the catbirds and thrashers. The name of the common mockingbird is Mimus polyglottos.",50,220);
    	g.drawString("The common mockingbird ranges from the northern United States to Mexico and the West Indies.",50,240);
    	}
     
    	public void texas(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Texas - Mockingbird",200,50);
    	g.drawImage(picture43,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Name of the mockingbird family is Mimidae, from the Latin mimus, meaning “mimic” or “imitator.”",50,200);
    	g.drawString("The family includes the catbirds and thrashers. The name of the common mockingbird is Mimus polyglottos.",50,220);
    	g.drawString("The common mockingbird ranges from the northern United States to Mexico and the West Indies.",50,240);
    	}
     
    	public void utah(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Utah - American Gull",200,50);
    	g.drawImage(picture44,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("A familiar parking lot gull, the Ring-billed Gull breeds primarily inland in North America. It can be found",50,200);
    	g.drawString("along the coasts, but many of these seagulls never see anything except fresh water all their lives.",50,220);
    	}
     
    	public void vermont(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Vermont - Hermit Thrush",200,50);
    	g.drawImage(picture45,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Hermit Thrush is the only member of its genus to spend the winter in North America. It changes its",50,200);
    	g.drawString("diet from eating nearly entirely insects in summer to one of equal parts insects and fruit in winter.",50,220);
    	}
     
    	public void virginia(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Virginia - Cardinal",200,50);
    	g.drawImage(picture46,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking in winter’s snowy",50,200);
    	g.drawString("backyards. In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void washington(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Washington - American Goldfinch",200,50);
    	g.drawImage(picture47,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("This handsome little finch, the state bird of New Jersey, Iowa, and Washington, is welcome and common at feeders,",50,200);
    	g.drawString("where it takes primarily sunflower and nyjer. Goldfinches often flock with Pine Siskins and Common Redpolls.",50,220);
    	g.drawString("Spring males are brilliant yellow and shiny black with a bit of white.",50,240);
    	}
     
    	public void westvirginia(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("West Virginia - Cardinal",200,50);
    	g.drawImage(picture48,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("Cardinals don’t migrate and they don’t molt into a dull plumage, so they’re still breathtaking in winter’s snowy",50,200);
    	g.drawString("backyards. In summer, their sweet whistles are one of the first sounds of the morning.",50,220);
    	}
     
    	public void wisconsin(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Wisconsin - Robin",200,50);
    	g.drawImage(picture49,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("The quintessential early bird, American Robins are common sights on lawns across North America, where",50,200);
    	g.drawString("you often see them tugging earthworms out of the ground. Robins are popular birds for their warm orange",50,220);
    	g.drawString("breast, cheery song, and early appearance at the end of winter.",50,240);
    	}
     
    	public void wyoming(Graphics g)
    	{
    	g.setFont(new Font("Arial",Font.BOLD,20));
    	g.drawString("Wyoming - Western Meadowlark",200,50);
    	g.drawImage(picture50,600,400,this);
    	g.setFont(new Font("Arial",Font.PLAIN,10));
    	g.drawString("abundant and familiar bird of open country across the western two-thirds of the continent, the Western",50,200);
    	g.drawString("Meadowlark is beloved for its melodic song. It is frequently seen singing atop fenceposts",50,220);
    	g.drawString("along roadsides in native grassland and agricultural areas.",50,240);
    	}
     
    }
    Last edited by copeg; May 19th, 2011 at 09:58 AM.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,370
    Thanks
    183
    Thanked 836 Times in 779 Posts
    Blog Entries
    5

    Default Re: help for noobs

    First, please use the code tags...with that amount of code its impossible to read without (I've edited your post). Second, despite the argument you make, you can shorten it. And in fact doing so (to an SSCCE) will get you help much faster (and might even reveal the problem you are having in the process of creating it). Lastly
    but it will not actually work
    This provides very little information for us to help you with. What about it doesn't work? What do you expect, and what do you get?

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,251
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: help for noobs

    Try adding some println statements to the code to show the values of variables as they change and to show execution flow. Look in the browser's Java console for the output.

    Where is the Expo class?
    Last edited by Norm; May 19th, 2011 at 11:16 AM.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,606
    My Mood
    Hungover
    Thanks
    145
    Thanked 658 Times in 563 Posts

    Default Re: help for noobs

    Also, stop blaming your teacher. Many people here are completely self-taught, without the aid of educators, classmates, tutors, etc. So blaming a resource that many people went without just seems lazy.

    But like copeg said- shorten your code to an SSCCE, and we'll go from there.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: help for noobs

    Noobs don't know what SSCCEs are. What happened was, when you click a button, a seperate slide comes up with information on the state bird and a picture. We got each of the buttons working, and found out how to cancel this "pop up slide" when it comes up. What we don't know is how to make the pictures display, because they're not displaying. What my friend was saying is that our program would compile without any errors and run, but when you clicked on the buttons, nothing would pop up. This problem has been solved by moving each state method(as you will see at the bottom of our program) into the switch(numcolor) method. Our teacher is helping us, so we aren't exactly blaming her. The point we're trying to make by talking about our teacher is the fact that we'll likely be out of the loop with anything you guys may suggest to us, and are looking for suggestions aligned with what we've learned so far. Previously when I made a thread, people were suggesting an outside program I'd never heard of to do it for me. Things like that are things we can't use. But anyways, the current problems is that our program is not calling the pictures into display correctly.(they are in the same file as our program) And the other is that we have 2 pages of buttons because the 50 of them can't all fit on one page. We don't exactly know how to program a 'next' button into our program to make it go to the next page of buttons and still work.

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,251
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: help for noobs

    don't exactly know how to program a 'next' button into our program to make it go to the next page of buttons
    That is where a SSCCE is useful. Instead of having to copy and work with this huge program that has tons of missing parts: the images and the Expo class, a small program that only works on the current problem would allow more people to work on solving the problem.

    This is really a poorly designed program. There should be a class for States containing all the logic needed for showing a state's info.
    And all the hardcoded positional numbers is a maintenance problem. The state objects should be positioned using a layout manager.

  7. #7
    Junior Member
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: help for noobs

    Okay, when I said we were noobs, I meant it. The problem with the pictures was that when we put the code in, we didn't put .jpg at the end. I CAN'T BELIEVE YOU HELPFUL GENTLEMEN COULDN'T FIGURE THAT OUT FOR US. WAS IT REALLY THAT HARD? TRYING TO FORCE ME TO DO AN SSCCE ON SUCH A SMALL PROBLEM. NOOBS.

  8. #8
    Junior Member
    Join Date
    May 2011
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: help for noobs

    Just kidding, just kidding. But we finished our program just now. It was a few dumb mistakes. Thanks for spending your time!

  9. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,251
    Thanks
    56
    Thanked 2,372 Times in 2,343 Posts

    Default Re: help for noobs

    Not all image files have that extension. An extension is NOT required for a file.

  10. #10
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,370
    Thanks
    183
    Thanked 836 Times in 779 Posts
    Blog Entries
    5

    Default Re: help for noobs

    Noobs don't know what SSCCEs are
    Did you try google? Did you see the links in our signatures?

    I CAN'T BELIEVE YOU HELPFUL GENTLEMEN COULDN'T FIGURE THAT OUT FOR US. WAS IT REALLY THAT HARD? TRYING TO FORCE ME TO DO AN SSCCE ON SUCH A SMALL PROBLEM. NOOBS.
    Kidding or not...none of us are paid to do this. You are getting help for free, asking help of people who spend their valuable time trying to help several people at once in a format that is sometimes difficult for communication. Being a 'noob' is no excuse for not making an effort to learn - to expect others to dive into your extensive code and try and solve a problem (when we don't even know what the problem is), and making no effort to take the advice you've received (learn what an SSCCE is).

  11. #11
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,606
    My Mood
    Hungover
    Thanks
    145
    Thanked 658 Times in 563 Posts

    Default Re: help for noobs

    Quote Originally Posted by Goforit View Post
    Okay, when I said we were noobs, I meant it. The problem with the pictures was that when we put the code in, we didn't put .jpg at the end. I CAN'T BELIEVE YOU HELPFUL GENTLEMEN COULDN'T FIGURE THAT OUT FOR US. WAS IT REALLY THAT HARD? TRYING TO FORCE ME TO DO AN SSCCE ON SUCH A SMALL PROBLEM. NOOBS.
    How could we know that, when we didn't have access to those files? When you didn't explain your problem at all? When you posted code that it would have taken forever to look through? Had you followed the link and learned the basics of what an SSCCE is, you would have solved your problem on your own in just a few minutes. Instead, you chose to insult the people who would have gladly helped you if you had shown a minimum amount of effort.

    Well, that's one way to be added to everyone's IgnoreList. You're going to have to try extra hard to get help in the future.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!