Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Print Screen in Java

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Video Aula Print Screen in Java

    Olá pessoal...


    [ame]http://www.youtube.com/watch?v=oAiJF9B3daM[/ame]

    Sourcer:
    Código PHP:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    package capture;

    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;

    /**
     *
     * @author Eduardo
     */
    public class Capture {
        private static 
    Rectangle Rectangle;

        
    /**
         * @param args the command line arguments
         */
        
    public static void main(String[] argsthrows AWTExceptionIOException {
            
            
    Robot robot = new Robot();
            
            
    Dimension a Toolkit.getDefaultToolkit().getScreenSize();
            
            
    Rectangle = new Rectangle(a);
            
            
    BufferedImage img robot.createScreenCapture(Rectangle);
            
            
    ImageIO.write(img"jpg", new File("c:/z/1.jpg"));
            
    ImageIO.write(img"bmp", new File("c:/z/2.bmp"));
            
    ImageIO.write(img"png", new File("c:/z/3.png"));
            
        }


    Att #M0rph
    "Nunca desista de seus sonhos. Desisti de seus sonhos é abrir mão da felicidade."
    (Augusto Cury)



    Meu Blog... http://www.lab-infor.blogspot.com
    Meu canal do Youtube... http://www.youtube.com/user/rodrigo32323232
X
Working...
X