How to display information taken from text area in netbeans (for a GUI)?

I have taken information from a text area (on a JFrame) and saved it as a variable, but now I would like to display the string thats stored in that variable in a different JFrame (which already have created). how do i go about doing this?

Example:

  1. one frame says: enter your name (store this value in a variable)
  2. click proceed
  3. closes first frame
  4. second frame is open now and I want to display the name of the player (variable) in the top corner of the JFrame.

Any ideas on what to use from the swing palette?

Answers


Save the value in a static variable so that you can use it anywhere.


Need Your Help

Initializer 'initWithRequest' reserved in the API?

objective-c xcode

Are the names of some initializer methods like 'initWithRequest' reserved in the API?