• Post Reply Bookmark Topic Watch Topic
  • New Topic

set textfield text from another class java

 
ofir roz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have got this 2 classes

but when i try to move the text from one to another i don't see it when i switch to the 2nd window, although i do see with when printing to console with getTest();



 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ofir,
Welcome to the Ranch!

I see some problems with your code:
a) Too long to read for people to help out - I suggest you create a SSCCE.
b) You are using both AWT and Swing components. ex.: TestField in the second class - this is a bad idea if intentional. If not, you should remember that Swing components start with a 'J' and you might have missed it.
c) I don't see any method where you set the text to (in the second class).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!