Trouble implementing part of code into GUI

Hiya, Im trying to create a simple GUI for an inventory program and I have completed the first frame and it works and all...Im having a really big problem trying to figure out how to create a second frame that will have the output just like the original code did. This is the cade im trying to implement into a second frame

Java Code:

for (int counter = 0; counter < 5; counter++)
{
System.out.printf(inventory[counter].toString()); //way to print out
//added two lines to get one-by-one BLG
System.out.println("Please press enter to see the next item...");
input.nextLine();
} // end for

To the original poster, cross-posting can frustrate anyone who tries to help you only to find out later that the same answer was given hours ago in a cross-posted thread. No one likes wasting their time, especially a volunteer. The polite thing to do would be to not do this, but if you feel that you absolutely must, to at least provide links in both cross-posts to each other.