佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1046|回复: 2

Java Applet 问题!!!

[复制链接]
发表于 7-5-2010 08:54 PM | 显示全部楼层 |阅读模式
有错吗?为什么不能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 : ");
         }
}
回复

使用道具 举报


ADVERTISEMENT

发表于 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 : ");
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 24-11-2025 05:37 AM , Processed in 0.116431 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表