Hey all, I am a 42 year old computer science major but only two years in so I still have much to learn. I have pulled some strings from a text file and loaded them into an array. What is the best way to have each string displayed every time the next question button is pushed? I am displaying it into a Text Field box, is this what would normally be used or is there a box better suited for this purpose? I was planning on doing basically the same thing in the program with a file full of jpg's, but was hoping to make them display in the same window each time a new question was brought up. Any thoughts, suggestions, or flat out help would be appreciated, Thanks.
I added code tags (to add them in the future either manually type in [ c o d e ] and [ / c o d e ] - but w/o the spaces, around you code, or clidk the "code" button over your reply box and put your code inside them).
Now as to your question, since your Strings are questions, I would imagine you'll have a spot in the GUI for the answers. Therefore it might be more suitable to have the questions as JLabels and the answers in an editable JTextField.
It would also be better to put your String Questions in an ArrayList.
As to cycling through them, whichever Collection you use, your would just loop through it and replace the text on the Component as you do so.