NewJFrame is the original frame, then it pops up a new frame when a button is clicked. They add text to the textfields and click add. It will then take the text and add it to the arrays.
Once again when you click the button it opens a new frame. Ask for input and writes the textfield input onto the end of the array. But it won't let you add the information. Both frames are in the same package. If you need more information just ask.
symbol : method add(java.lang.String) location: class java.lang.String NewJFrame.AirlineName.add(jTextField1.getText());
rhino17 wrote:Saying this to BDLH. Now that's got to be one of funniest posts of the day!
well thank you for that, but you still didnt answer my question, if you dont know what the answer is then please dont post on my forums
rhino17 wrote:Using a dialog will probably make the GUI work more smoothly and will allow you to display and retrieve information modally, but won't change basic object to object communication.
That might be the problem. I'm creating a whole new Jframe, not a dialog box.
I'm new to this whole Java Business ( HS student, learning w/o an actual teacher) . I'll do reasearch on a dialog box, or if u have a quick link to a tut that would be great.[How to Make Dialogs|http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html]
And i did not understand BDLH's original message, he sounded like he was trying to be a ... you get the point.If you stay around this board for long, you'll see that BDLH is one of the nicer posters around. He'll kid at times but almost always in a gentle fashion. I however can be a flaming asshole at times.
Is there a way to retrieve more than one input value?Absolutely. For instance if you used a JOptionPane, you could place a JPanel within it that has several JTextFields, and easily extract this information. But note that there are always messy quick and dirty ways of doing this that don't scale well as your project grows or changes. What BDLH was suggesting was to keep your logic and your GUI separate and your class coupling loose so as to avoid these pitfalls. Also know this. If you see him disagreeing with something someone here says (including or especially me), I'd go with his interpretation over mine any day as he's a pro.