ZombieDetector: Difference between revisions

From Mobile Application Design
Jump to navigationJump to search
No edit summary
m Protected "ZombieDetector" [edit=autoconfirmed:move=autoconfirmed]
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
[http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/tubonyh.htm samsung ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1113 cheap hoodia] [http://acdronou.jubiiblog.de/ diazepam online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832224) mp3 ringtones] [http://alcodom.blogdiario.com/ viagra online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=370 online xanax] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832241) soma online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=312 adipex] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=318 cialis online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1105 order pharmacy online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1066 soma online] [http://coracou.jubiiblog.de/ cheap hydrocodone] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1094 buy didrex] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1087 lorazepam online] [http://www.forumhosting.org/forum.php?mforum=covarrel funny ringtones] [http://lasitdron.jubiiblog.de/ cheap sildenafil] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1084 cheap levitra] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/nyzihyp.htm free tracfone ringtones] [http://manka-kapak.blogspot.com casino craps online] [http://www.rso.cmich.edu/prevet/messageboard/000031c8.htm free ringtones] [http://www.forumhosting.org/forum.php?mforum=oudronacel didrex online] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/kukoti.htm cheap cialis] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/sinyfu.htm free mp3 ringtone] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832228) nextel ringtones] [http://ervarli.blogdiario.com/ jazz ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=148 free motorola ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832235) punk ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832253) wellbutrin online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832204) free cool ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$88 free alltel ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1134 alltel ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=361 buy tramadol] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$106 free nokia ringtones] [http://discussions.csbsju.edu/general/messages/25/xyvi-237.html cheap viagra] [http://www.rso.cmich.edu/prevet/messageboard/000031b5.htm generic adipex] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832230) norco online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=134 order wellbutrin] [http://www.csun.edu/learningnet/discussion/file.php?0,file=132 lorazepam online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832234) order propecia] [http://alcta.blogdiario.com/ sprint ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1092 ultracet] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1100 zoloft online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1136 free cool ringtones] [http://liboor.jubiiblog.de/ tracfone ringtones] [http://letorolac.jubiiblog.de/ motorola ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832201) cheap cialis] [http://www.rso.cmich.edu/prevet/messageboard/000031c5.htm generic levitra] [http://domvimon.jubiiblog.de/ buy norco] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1068 phentermine online] [http://ertral.jubiiblog.de/ carisoprodol] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1074 cialis online] [http://enchanted1312.blogspot.com injecting valium] [http://www.forumhosting.org/forum.php?mforum=ricrolget free music ringtones] [http://el5or5ro.blogdiario.com/ free motorola ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031c3.htm generic clonazepam] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1128 polyphonic ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/lusuli.htm cheap viagra] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$113 free sagem ringtones] [http://bocoleto.jubiiblog.de/ free alltel ringtones] [http://discussions.csbsju.edu/general/messages/25/lepef-234.html diazepam online] [http://discussions.csbsju.edu/general/messages/25/dyjys-243.html order adipex] [http://discussions.csbsju.edu/general/messages/25/zisi-231.html xanax online] [http://olorolacel.blogdiario.com/ cheap diazepam] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832220) meridia online] [http://www.forumhosting.org/forum.php?mforum=vartrocvi verizon ringtones] [http://www.forumhosting.org/forum.php?mforum=safunder viagra online] [http://algettr.blogdiario.com/ carisoprodol online] [http://www.rso.cmich.edu/prevet/messageboard/000031b7.htm vicodin online] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=315&FORUM_ID=3&CAT_ID=3 cheap viagra] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$96 fioricet online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1112 flexeril online] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/jeziluc.htm generic adipex] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=302&FORUM_ID=3&CAT_ID=3 soma online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832222) free mono ringtones] [http://tavidel.blogdiario.com/ free sony ericsson ringtones] [http://www.forumhosting.org/forum.php?mforum=yohiatt buy meridia] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$135 verizon ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/pixe.htm free cingular ringtones] [http://livisit.blogdiario.com/ valium online] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/pypybug.htm free nextel ringtone] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/cicyfi.htm free polyphonic ringtone] [http://boricdom.blogdiario.com/ nextel ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$107 norco online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=335 midi ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$100 cheap meridia] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=351 free real ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=323 diazepam online] [http://roacpas.jubiiblog.de/ but ultram] [http://cnac4tco.blogdiario.com/ mp3 ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1081 cheap alprazolam] [http://www.rso.cmich.edu/prevet/messageboard/000031da.htm free samsung ringtone] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=359 sprint ringtones] [http://cozelrol.jubiiblog.de/ xenical] [http://olobasno.jubiiblog.de/ samsung ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=126 alprazolam online] [http://domrelchi.jubiiblog.de/ cheap nexium] [http://cnatadel.blogdiario.com/ xanax online] [http://www.rso.cmich.edu/prevet/messageboard/000031d7.htm free motorola ringtone] [http://www.csun.edu/learningnet/discussion/file.php?0,file=128 but paxil] [http://vizelsit.jubiiblog.de/ free ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1099 lisinopril online] [http://discussions.csbsju.edu/general/messages/25/wykypof-226.html tramadol online] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/nikol.htm cheap ultram] [http://www.forumhosting.org/forum.php?mforum=wiwhistl cheap vicodin] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1076 cheap viagra] [http://kleinerachel.blogspot.com valium ativan] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832210) fioricet] [http://www.forumhosting.org/forum.php?mforum=aceldarro sonyericsson ringtones] [http://cnacorel.blogdiario.com/ free mono ringtones] [http://eltrli.jubiiblog.de/ vicodin online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=120 online ativan] [http://taoudel.blogdiario.com/ buy sildenafil] [http://www.csun.edu/learningnet/discussion/file.php?0,file=159 free alltel ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=365 free verizon ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=338 free mp3 ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1098 cheap albuterol] [http://www.hcs.harvard.edu/~twiki/pub/Main/AngelKristofer/colivew.htm free alltel ringtone] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1119 free mp3 ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832203) clonazepam online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=352 free sagem ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=345 paxil online] [http://wildomania.blogspot.com ambien sleep walking] [http://eltsitzel.blogdiario.com/ free sagem ringtones] [http://www.forumhosting.org/forum.php?mforum=cnataco free nokia ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=367 cheap vicodin] [http://forum.kharkiv.edu/SForums/topic.asp?TOPIC_ID=318&FORUM_ID=3&CAT_ID=3 cheap norco] [http://boroltroc.jubiiblog.de/ funny ringtones] [http://dar5or5tr.blogdiario.com/ free midi ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=363 ultram online] [http://domdronpas.blogdiario.com/ order tramadol] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/nenopo.htm cheap tramadol] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/xoky.htm cheap paxil] [http://ginny-potter21.blogspot.com caribbean casino gold online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1109 cheap diethylpropion] [http://www.csun.edu/learningnet/discussion/file.php?0,file=137 ultracet] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$94 clonazepam online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832215) jazz ringtones] [http://capasget.jubiiblog.de/ sagem ringtones] [http://www.hcs.harvard.edu/~twiki/pub/Main/CoyarCharline/kifily.htm generic ativan] [http://www.forumhosting.org/forum.php?mforum=troctapas free mtv ringtones] [http://skyph0ne.blogspot.com bonus casino free online] [http://www.forumhosting.org/forum.php?mforum=trerc4t free mono ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=332 cheap levitra] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=333 lorazepam online] [http://www.forumhosting.org/forum.php?mforum=monractroc punk ringtones] [http://www.rso.cmich.edu/prevet/messageboard/000031ae.htm generic fioricet] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$103 free mp3 ringtones] [http://www.forumhosting.org/forum.php?mforum=dronzelchi free sony ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832208) didrex online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1096 order sildenafil] [http://rellaboc.blogdiario.com/ adipex online] [http://elnobas.jubiiblog.de/ levitra online] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832233) polyphonic ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$104 music ringtones] [http://www.forumhosting.org/forum.php?mforum=lioubo real ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$99 levitra online] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=364 valium online] [http://www.forumhosting.org/forum.php?mforum=basroget midi ringtones] [http://trsitcna.blogdiario.com/ free sharp ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1140 free kyocera ringtones] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=350 qwest ringtones] [http://pathology.jhu.edu/N/n.web?EP=N&URL=/MCGI/SEND1^WEBUTLTY(200,832251) viagra online] [http://www.rso.cmich.edu/prevet/messageboard/000031cd.htm free funny ringtone] [http://www.forumhosting.org/forum.php?mforum=trocerrol jazz ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$111 qwest ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1085 cheap hydrocodone] [http://letobocco.jubiiblog.de/ valium online] [http://kimichameleon.blogspot.com valium grapefruit] [http://www.csun.edu/learningnet/discussion/file.php?0,file=124 cheap norco] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=314 cheap alprazolam] [https://www-internal.slac.stanford.edu/glast/integrationtest/online/Forum/topic.asp?TOPIC_ID=348 but propecia] [http://www.rso.cmich.edu/prevet/messageboard/000031ab.htm cheap phentermine] [http://www.forumhosting.org/forum.php?mforum=getcdel nexium online] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$110 polyphonic ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1083 order paxil] [http://mabelsthecat.blogspot.com affiliate casino online program] [http://www.forumhosting.org/forum.php?mforum=oloeltdom free free ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1077 cheap meridia] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1030?id=atch1107 cheap vigrx] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$136 viagra online] [http://eltmonboc.jubiiblog.de/ music ringtones] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$101 mono ringtones] [http://discussions.csbsju.edu/general/messages/25/bedisuz-244.html order norco] [http://letovipas.jubiiblog.de/ cheap tramadol] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1075 order ativan] [http://caacbas.blogdiario.com/ free punk ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1029?id=atch1065 buy tramadol] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1141 sony ringtones] [http://www.csun.edu/learningnet/discussion/file.php?0,file=117 ultram] [http://paschitr.jubiiblog.de/ soma online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=127 clonazepam online] [http://www.rso.cmich.edu/prevet/messageboard/000031a9.htm soma online] [http://www.csun.edu/learningnet/discussion/file.php?0,file=123 adipex online] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1137 sharp ringtones] [http://chiborol.jubiiblog.de/ didrex] [http://www8.vjc.edu/EnvironmentalClub/discuss/msgReader$109 cheap phentermine] [http://or5alpas.blogdiario.com/ levitra online] [http://mutantalias.blogspot.com valium use] [http://www.forumhosting.org/forum.php?mforum=bocboor motorola ringtones] [http://src.moffitt.usf.edu/sf/sfmain/do/downloadAttachment/projects.jaffy/tracker.bug_tracker/artf1031?id=atch1126 free music ringtones] === Overview ===
=== Overview ===


=== Setup ===
=== Setup ===
Line 115: Line 115:
String word = mSubmitField.getString();
String word = mSubmitField.getString();
//System.out.println is useful for debugging and sending things to the console.  
//System.out.println is useful for debugging and sending things to the console.  
System.out.println("Got the String - "   word);
System.out.println("Got the String - " + word);
String result;
String result;



Latest revision as of 21:09, 13 May 2007

Overview

Setup

  1. Create a new J2ME Midlet Suite in Eclipse by right-clicking in the Package Manager, selecting New -> Project -> J2ME Midlet Suite
  2. Call this ZombieDetector. Leave everything else as is.
  3. Right-click on your ZombieDetector project and select New -> Class
  4. Use src as your package and ZombieDetector as the class name. Click Finish.
  5. Open your new ZombieDetector class
  6. Cut and paste the code from below into your file. Save.
  7. Open up the ZombieDetector.jad file
  8. Click on the Midlets tab. Click Add.
  9. Write in ZombieDetector as the MIDlet name.
  10. Click in the button that appears in class. You may have to start typing Zombie in. It should find your class automatically. If nothing happens, try closing all the files down and opening them again.
  11. Right-click your project again, select Run As, then Run...
  12. Setup so that it looks something like this - run_dialog.png
  13. Run your MIDlet
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 * Zombie Detector
 * @author Michael Sharon
 * 
 * This program will allow a user to type in a sentence and detect if they are a zombie or not. 
 *
 * Notice that we're implementing the CommandListener and Runnable. Read up on those two classes in the API docs.
 * Runnable - http://uberthings.com/mobile/docs/midp1/java/lang/Runnable.html
 * CommandListenter - http://uberthings.com/mobile/docs/midp1/javax/microedition/lcdui/CommandListener.html
 */
public class ZombieDetector extends MIDlet implements CommandListener, Runnable {

	//Create our variables

	//Every MIDlet will always contain exactly one Display object
	//Display represents the device's display manager and input devices
	private Display mDisplay;

	private Command mExitCommand, mDetectCommand, mCancelCommand;

	//Setting up the Textbox and Progress Forms (like the example in class)
	private TextBox mSubmitBox;

	private Form mProgressForm;

	private StringItem mProgressString;

	//Field / Form style
	private TextField mSubmitField;

	private Form mDetectionForm;

	public ZombieDetector() {
		mExitCommand = new Command("Exit", Command.EXIT, 0);
		mDetectCommand = new Command("Detect", Command.SCREEN, 0);

		mSubmitBox = new TextBox("ZombieDetector", "Am I a Zombie?", 32, 0);
		mSubmitBox.addCommand(mExitCommand);
		mSubmitBox.addCommand(mDetectCommand);
		mSubmitBox.setCommandListener(this);

		mSubmitField = new TextField(
				"Type a few words below to check if you are a zombie:",
				"I am not a zombie.. honest..", 32, 0);
		mDetectionForm = new Form("Zombie Detector");
		mDetectionForm.addCommand(mExitCommand);
		mDetectionForm.addCommand(mDetectCommand);
		mDetectionForm.append(mSubmitField);
		mDetectionForm.setCommandListener(this);

		mProgressForm = new Form("Lookup progress");
		mProgressString = new StringItem(null, null);
		mProgressForm.append(mProgressString);
	}

	public void startApp() {
		mDisplay = Display.getDisplay(this);

		//uncomment the mSubmitbox line below to run it like the example in class
		//mDisplay.setCurrent(mSubmitBox);
		mDisplay.setCurrent(mDetectionForm);

	}

	public void pauseApp() {
	}

	public void destroyApp(boolean unconditional) {
	}

	//This is called whenever we select a command
	public void commandAction(Command c, Displayable s) {
		if (c == mExitCommand) {
			destroyApp(false);
			notifyDestroyed();
		} else if (c == mDetectCommand) {
			// Show the progress form.
			mDisplay.setCurrent(mProgressForm);
			// Kick off the thread to do the query.
			Thread t = new Thread(this);
			t.start();
		}
	}

	/*
	 * The run() method is automatically called when a new Thread is started. 
	 *
	 */
	public void run() {

		//uncomment the line below if you want use the TextBox
		//String word = mSubmitBox.getString();
		String word = mSubmitField.getString();
		//System.out.println is useful for debugging and sending things to the console. 
		System.out.println("Got the String - " + word);
		String result;

		result = checkForZombie(word);

		//Place the result into an Alert
		Alert results = new Alert("Result", result, null, null);
		results.setTimeout(Alert.FOREVER);

		//Display the Alert, followed by the next Displayable - in this case our Form or Textbox
		//Uncomment the line below to use the Textbox
		//mDisplay.setCurrent(results, mSubmitBox);
		mDisplay.setCurrent(results, mDetectionForm);
	}

	private String checkForZombie(String word) {
		String isZombie = null;
		int zombieCheck = 0;

		//Check if we're dealing with a zombie
		zombieCheck = word.indexOf("brain");

		if (zombieCheck == -1) {
			isZombie = "This is a live one. No zombies here.";
		} else {
			isZombie = "Eeek! Run for your lives!";
		}

		return isZombie;
	}
}