This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Basically I need to make a program that will print out the animal letters that the user enters into a textbox. I don't know how many letters will be entered so I need to get it after the button has been pressed to define the animals. But this doesn't work, the print dialog box opens and nothing appears. Yet if I specify that animals was String animals = new String at the beginning, I will get 5 pages in the print preview. How can I get this to show without specifying it ahead of time? thanks for any help, I've been stuck on this for days.
Ok, so here is a working example. when I type in "cat, dog, cow" and press printer, I see that nothing has happened in the print preview. There should be 3 pages with cat dog and cow on them. I'm not sure what's going on?