Results 1 to 2 of 2
- 11-12-2010, 01:28 AM #1Member
- Join Date
- Nov 2010
- Rep Power
im starting a project soon but want some tips/help
hi all, i am taking a java class this semester and its time for a final project
my final project is to make a gui that is sort of a search engine for shakespeare plays
maybe 5-10 plays(ie hamlet, romeo&juliet, macbeth etc) total i think, not sure about that
so the gui will ask the user for a word/phrase
when the user hit search, the program will find all the occurrences of the word/phrase in the selected plays
so the output of this would be a gui that displays the word/phrase and where the phrase occurs along with the play name, line, act, and scene
im thinking this will take about 1k+ lines of coding...
i am familiar with making GUIs but i am clueless about how to search through a txt file to fine the word/phrase
can someone give me some sites or short tutorials for something like that???
ive googled n im not finding what im looking for...
Last edited by ychen42; 11-12-2010 at 01:30 AM.
- 11-12-2010, 02:17 AM #2
File (Java 2 Platform SE 5.0)
Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)
Basically, once you have your keyword, you want to loop through every line in the file and see if it contains the keyword (using String methods like indexOf() or contains()).
- By reeveliew in forum New To JavaReplies: 13Last Post: 06-15-2010, 06:29 PM
- By adz06 in forum New To JavaReplies: 5Last Post: 12-07-2009, 02:35 AM
- By kulangotski in forum Advanced JavaReplies: 4Last Post: 03-09-2009, 06:09 PM
- By PVL268 in forum New To JavaReplies: 4Last Post: 02-27-2009, 03:37 PM
- By Komala_aradhya in forum New To JavaReplies: 1Last Post: 08-03-2007, 02:25 PM