Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we send swing component to server

 
narasimharao konjeti
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
narasimharao konjeti
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this was my interview question, that is what i want to clarify this doubt,

thanking you

regards
narasimharao konjeti
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic