Support Forums

Full Version: Text Document Interpreter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings! Last night I working on a Jeopardy game that allows you to configure the game through editing a text file.

Reason


My science teacher uses the slide show feature from OpenOffice to create Jeopardy games for test reviews. It's very fun, but sometimes he makes a mistake and it messes the entire game up... very inconsistent. So, being OCD, I have decided to make him a consistent game where he can just make different text documents to review different lessons.... here is what the text document example looks like with example input.
---------

Here is the actual text document example that the program reads from. This is placed in the same directory as the Java program. It's quite self explanatory... the first integer stands for what category the specific line being read is declaring. The second string tells whether it is defining the category name ("cat"), a question ("q:"), or an answer ("a:"). Once it has figured out what the information in the specific line is declaring, it records it in the appropriate array. Yes, it is a very simple script... but you have to admit, it's pretty long for a text document reader >.>


Oh, and before I forget... if anyone knows where to download Javax so I can use the Javax.Swing classes, could you tell me please? ;_; ty!!!
Javax? That comes with the JDK. Just import,
Code:
import javax.swing.*;