Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Robot createScreenCapture() method not working correctly

 
tim charles
Greenhorn
Posts: 13
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
*bump*
 
Rob Spoor
Sheriff
Posts: 20822
68
Chrome Eclipse IDE Java Windows
  • 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
  • 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
  • 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
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 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 an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!