Programming
No. | 662 | ||||
Name. | swindler | ||||
Subject. | Java 화면캡쳐 | ||||
Main Cate. | Java | ||||
Sub Cate. | |||||
Date. | 2009-09-25 11:51 | ||||
Hit. | 7326 (211.36.27.8) | ||||
File. | |||||
JDK1.5에 생겨난 기능중에 화면캡쳐를 할수도 있구나 ^^ package com.dnt7; import java.awt.*; import java.awt.image.*; import java.io.*; import javax.imageio.*; public class Capture { public static void main(String [] args) { try { // 전체 화면 Capture BufferedImage screencapture = new Robot().createScreenCapture( new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()) ); // JPEG 저장. File file = new File("screencapture.jpg"); ImageIO.write(screencapture, "jpg", file); } catch (HeadlessException e) { e.printStackTrace(); } catch (AWTException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } [바로가기 링크] : http://coolx.net/cboard/develop/662 |
|||||
|
|||||
[Modify] [Delete] | [Reply] [List] |