• Post Reply Bookmark Topic Watch Topic
  • New Topic

cloning swing components

 
Lukas Stephienn
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
Is it possible to clone swing component? I want to create exact copy of JTextField which each method will return same results as methods of original JTextField.
If anyone have ideas about that, I would be pleased.
 
Shyam Prasad Murarka
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Readers,
I am seriously very confused about what you are asking. It seems you want to create a sub-class of JTextField. That would give the sub-class most of the capabilities of the superclass. But if you actually want even the private methods and all from JTextField then simply open up the source file of JTextField and copy-paste it into another file.
 
Lukas Stephienn
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A little misunderstanding appeared here.
I want to create clone of an OBJECT not class.
 
cat cater
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mark!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!