|
查看: 1046|回复: 2
|
Java Applet 问题!!!
[复制链接]
|
|
|
有错吗?为什么不能save?
public void actionPerformed(ActionEvent e)
{
if (e.getActionCommand() == "Save")
try{
Robot robot=new Robot();
// capture the whole screen
BufferedImage screencapture = robot.createScreenCapture(new Rectangle(new Dimension(200,200)) );
// Save as JPEG
File file = new File("c:/screencapture.jpg");
ImageIO.write(screencapture, "jpg", file);
System.out.println("screen capture finished : ");
} catch(Exception x)
{
System.out.println("screen capture error : ");
}
} |
|
|
|
|
|
|
|
|
|
|
发表于 7-5-2010 10:20 PM
|
显示全部楼层
看出什么 err msg 啦..
只有一小段.. 鬼知道什么问题..  |
|
|
|
|
|
|
|
|
|
|

楼主 |
发表于 7-5-2010 10:36 PM
|
显示全部楼层
没有error!!!
只是printout in DOS screen capture error :!!!
就是不能run这part!!!
Robot robot=new Robot();
// capture the whole screen
BufferedImage screencapture = robot.createScreenCapture(new Rectangle(new Dimension(200,200)) );
// Save as JPEG
File file = new File("c:/screencapture.jpg");
ImageIO.write(screencapture, "jpg", file);
System.out.println("screen capture finished : "); |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|