wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes can we send swing component to server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "can we send swing component to server" Watch "can we send swing component to server" New topic
Author

can we send swing component to server

narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
hi,

how to send a swing object(i.e. JTextField jf=new JTextField()), here i have to send the jf object the server from the client problem, can i send it, if i can send, how do i send, if not ? y?
please reply the question,

waiting for reply.

thanking you

regards
narasimharao konjeti


"Unwise to sweat petty stuff, wise to pet sweaty stuff."
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Do you really need to send the JTextField? or only the text within it?

You can serialize a JTextField as any other object. However mind this warnning in the API:

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.


SCJP2. Please Indent your code using UBB Code
narasimharao konjeti
Ranch Hand

Joined: Apr 26, 2003
Posts: 130
this was my interview question, that is what i want to clarify this doubt,

thanking you

regards
narasimharao konjeti
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can we send swing component to server
 
Similar Threads
how to get JTextField value from another class
serialzation
Restricting numeric input
Drag and Drop Swing Components
Can I pass JTextField as parameter?