Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Robot Failing

dave@grumman

Location : Melbourne FL USA
Member since : Sep 23, 2003
Messages : 1
 Sep 23, 2003 at 9:38 PM
I am using j2sdk1.4.1_02, and the 2.5Beta classes, and on Windows 2000. The code is as follows:

try
{
Robot robot = new Robot();
Dimension screenDims = Toolkit.getDefaultToolkit().getScreenSize();
screen = robot.createScreenCapture(
new Rectangle(0, 0,
screenDims.width,
screenDims.height));

MediaTracker tracker = new MediaTracker(new Label());
tracker.addImage(screen, 0);
tracker.waitForID(0);
}
catch (Exception e)
{
writeToLog("Exception in screengrabber: " + e.getMessage());
writeToLog(e.toString());
}

The message is null, and the e.toString() is a null pointer exception....

This works without the pja classes....

Any ideas? Thanks.

Dave
---
Dave

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Sep 24, 2003 at 10:14 AM
PJA Toolkit main purpose is the creation of off-screen images, and it doesn't emulate a virtual desktop with its windows... I imagine it could be interesting to be able to create Frame or JFrame instances displayed in an off-screen desktop on a server and to send back a screen capture of these frames to clients, but this is not possible at this time. Thus, createScreenCapture method can't work in PJA.
Do you think there could be a lot of people interested having a virtual desktop at disposal in PJA ?
---
Manu (moderator/modérateur)

Twiun

Location : London, United Kingdom
Member since : Sep 2, 2004
Messages : 1
 Sep 2, 2004 at 6:48 PM
Hi Manu,

There are some tools for achieving this already, namely the WeirdX[1] and two VNC java implementations (jVNC[2] and VNCj[3]).

Personally, I'm already using VNCj in this fashion to debug my Odonata[4] project as well as using PJA's font subsystem for bitmapped fonts ;-)

BTW, Thanks for PJA, it's a great piece of work!

Steph

[1] http://www.jcraft.com/weirdx/
[2] http://www.developvnc.org/logged-in/jVNC-info.html
[3] http://www.amherst.edu/~tliron/vncj/
[4] http://odonata.tangency.co.uk


Home pageFind It!ContactTop

© Copyrights 1997-2014 eTeks - All rights reserved

PJAPJA documentation