• Post Reply Bookmark Topic Watch Topic
  • New Topic

copying JFrame into Clipboard - urgent  RSS feed

 
indian greenhorn
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I want to know whether it is possible to copy a JFrame with its components(JButtons,JLabels) into the clipboard and paste it from the clipboard to anyother application like MS-Paint. If it is possible please provide me the details.
regards,
Krish
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ummm... not sure how you would actually copy Java components into MS Paint, but what you could do is get a screenshot of the app using the Robot class and copy that to the clipboard.

There's an older post that provides code on how to do this.
 
indian greenhorn
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thankx to know that it is somehow possible.
Krishna
 
Eddie Vanda
Ranch Hand
Posts: 283
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may be too simple, but you could put the focus into your frame by clicking on it somewhere and then use Alt PrtSc to copy its image into Window's clipboard.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!