This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes reading data from Jtextfield on jpanel on jframe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "reading data from Jtextfield on jpanel on jframe" Watch "reading data from Jtextfield on jpanel on jframe" New topic
Author

reading data from Jtextfield on jpanel on jframe

Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62
hi
i am not able to read from a jTextfield which is on a jpanel object and this jpanel object is added on the jframe.

jtextfield is static in the class
iam trying to read the jtextfield in the ActionListener

if i remove the jtextfield from jpanel and add the jtextfield on the jframe
i can get the data entered in jtextfield.

please help
thxs


Thanks.
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Please post your code
Vilpesh Mistry
Ranch Hand

Joined: May 27, 2003
Posts: 62
thanks Nigel for the prompt response,as it made me to go through the code
and i found that the line that adds the panel containing the JTextField on the Container(JFrame) was not present in my code.

i added the panel on the Container and code worked.

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading data from Jtextfield on jpanel on jframe
 
Similar Threads
Adding a text field to JDialog with JTextField
Update Data between Frames
Too many columns slowing down program
Cannot take populate JTextfield
Custom Dialog - please help