This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want to handle an array of JTextFields to insert in to a TextArea when a given button is pushed.

 
Adam Cripps
Ranch Hand
Posts: 41
Eclipse IDE Linux Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having problems conceptually getting my head around how to make my application work.

I have 15 JTextField components and 15 JButton components and 1 JTextArea. I want each button to insert the text inside the textarea from each corresponding textfield.

If you wish to see a graphic to explain this setup -http://i.imgur.com/Vnc3C.png

I've managed to get frame.finaltext to the Curriculum subject class, but it is not seen inside the actionPerformed method.

What is the best way of getting a hold of frame.finaltext.append(textfields[i])

TIA
Adam

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic