| 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: 19216
|
|
|
I think you'll have some more success in our GUI forum. Moving there.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
|
posted

0
|
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: 8436
|
|
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?
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
 |
|
|
subject: Robot createScreenCapture() method not working correctly
|
|
|