File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Robot createScreenCapture() method not working correctly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Robot createScreenCapture() method not working correctly" Watch "Robot createScreenCapture() method not working correctly" New topic
Author

Robot createScreenCapture() method not working correctly

tim charles
Greenhorn

Joined: Oct 09, 2009
Posts: 13
Has anyone got an idea to why the following is capturing my entire screen rather than just what's inside the bounds of jpModel?




Regards
Tim
tim charles
Greenhorn

Joined: Oct 09, 2009
Posts: 13
*bump*
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

I think you'll have some more success in our GUI forum. Moving there.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
what was the result of

System.out.println(jpModel.getBounds());
tim charles
Greenhorn

Joined: Oct 09, 2009
Posts: 13
java.awt.Rectangle[x=0,y=0,width=991,height=536]

Which is far larger than the JPanel (jpModel) itself. I have no idea why its doing this
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

tim charles wrote:I have no idea why its doing this

Neither have we
Maybe you can try running your application in a debugger and see at what stage the bounds are getting set?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Robot createScreenCapture() method not working correctly