File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: reading data from Jtextfield on jpanel on jframe