File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Robot createScreenCapture() method not working correctly

 
tim charles
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*bump*
 
Rob Spoor
Sheriff
Pie
Posts: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you'll have some more success in our GUI forum. Moving there.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what was the result of

System.out.println(jpModel.getBounds());
 
tim charles
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic