• Post Reply Bookmark Topic Watch Topic
  • New Topic

can i create a jpanel from an existing

 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kindly somebody suggest me

can i create a jpanel grpm an existing ?
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i create a jpanel grpm an existing ?

What? And what's "grpm"?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
grpm (from?)

from an existing (what)?
 
Campbell Ritchie
Marshal
Posts: 52547
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean can you subclass JPanel to create a special‑purpose panel? If so, yes.
 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean can you take an existing JPanel and make a copy of it, including fields? Not without quite a bit of coding. You'd have to recreate each nested component. You can of course delegate that work to a utliity method / class or to a special sub class.
 
phooton misra
Ranch Hand
Posts: 52
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somebody please suggest me how can i copy a jpanel from another jpanel?
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
phooton misra wrote:Somebody please suggest me how can i copy a jpanel from another jpanel?


Rob already did:
Rob Spoor wrote:Do you mean can you take an existing JPanel and make a copy of it, including fields? Not without quite a bit of coding. You'd have to recreate each nested component. You can of course delegate that work to a utliity method / class or to a special sub class.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!