• Post Reply Bookmark Topic Watch Topic
  • New Topic

Static TextField

 
Drew Lane
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to create a static textfield where I can enter a name in it and then switch to another panel (I'm using cardlayout) and display the same name in that panel.
Can I do this without storing the value of the textfield somewhere?
I tried something like
static Textfield myTextField = new TextField();
but it didn't work in both panels, only one.
Any ideas?
Thanks,
Drew
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use two textfield and transmit only the value. the overhead of two field instead of one won't be a problem for you?!
c
 
Jeremy Maddera
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have the two textfields share the same document object.....
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!