Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

help on accessing the component in the tab Pane  RSS feed

 
arnie frenato
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IRC Client problem - kindly check the codes..

Is it possible to display the text in the textfield to the textarea on the focused tab?

Thanks in advance.. Sorry, as of now, the code is messy..
[ March 13, 2007: Message edited by: arnie frenato ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
haven't clicked the link, but these steps should work (depending on structure)

add a ChangeListener, which gets the 'selected tab', then
textArea['selected tab'].setText(textField.getText());
or
panel['selected tab'].textArea.setText(textField.getText());
 
arnie frenato
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Uhm, my problem is actually this.. Everytime you join a channel, it creates a new tab on the JTabbedPane.. The created new tab has a JPanel with a JTextArea inside it.. I'm having trouble on displaying the text messages on the the correct JTextArea of the correct tab.. So, any solution?

Thanks in advance..
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!