Package java.awt

Examples of java.awt.Toolkit.createImage()


/*     */
/*     */   public Image getImage(URL url) {
/* 261 */     Toolkit tk = Toolkit.getDefaultToolkit();
/*     */     try {
/* 263 */       ImageProducer prod = (ImageProducer)url.getContent();
/* 264 */       return tk.createImage(prod);
/*     */     } catch (IOException e) {
/*     */     }
/* 267 */     return null;
/*     */   }
/*     */
View Full Code Here


/*     */
/*     */   public Image getImage(URL url) {
/* 340 */     Toolkit tk = Toolkit.getDefaultToolkit();
/*     */     try {
/* 342 */       ImageProducer prod = (ImageProducer)url.getContent();
/* 343 */       return tk.createImage(prod); } catch (IOException e) {
/*     */     }
/* 345 */     return null;
/*     */   }
/*     */
/*     */   public Applet getApplet(String name)
View Full Code Here

        btnBruteForce = new javax.swing.JButton();
        mainErrorWarningBruteForce = new javax.swing.JLabel();
       
        URL url = ClassLoader.getSystemResource("com/ike/rwdccalc/Resources/Lawton_EHS_Logo.png");
        Toolkit kit = Toolkit.getDefaultToolkit();
        Image img = kit.createImage(url);
        setIconImage(img);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Eisenhower High School RWDC Calculator");
View Full Code Here

        .getCodeSource();
    File jarFile = new File(codeSource.getLocation().toURI().getPath());
   
    URL url = ClassLoader.getSystemResource("com/ike/rwdccalc/Resources/Lawton_EHS_Logo.png");
        Toolkit kit = Toolkit.getDefaultToolkit();
        Image img = kit.createImage(url);
        setIconImage(img);
     
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
View Full Code Here

        .getCodeSource();
    File jarFile = new File(codeSource.getLocation().toURI().getPath());
   
    URL url = ClassLoader.getSystemResource("com/ike/rwdccalc/Resources/Lawton_EHS_Logo.png");
        Toolkit kit = Toolkit.getDefaultToolkit();
        Image img = kit.createImage(url);
        setIconImage(img);
     
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
View Full Code Here

    @Override
    public BufferedImage getSicknessImage() {
        if (imageSickness == null) {
            Image image = getImageFromResourceTransparent("/sickness.png", Color.WHITE, new Rectangle(296, 265));
            Toolkit tk = Toolkit.getDefaultToolkit();
            image = tk.createImage(new FilteredImageSource(image.getSource(), new CropImageFilter(0, 0, 200, 285)));
            imageSickness = BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB);
        }
        return imageSickness;
    }
View Full Code Here

        this.desiredHeight = desiredHeight;

        error = url == null;
        if (!error) {
            final Toolkit tk = Toolkit.getDefaultToolkit();
            image = tk.createImage(url);
            tk.prepareImage(image, desiredWidth, desiredHeight, this);
        } else {
            image = null;
        }
    }
View Full Code Here

        }
       
        buffer = bos.toByteArray();

        Toolkit tk = Toolkit.getDefaultToolkit();
        final Image img = tk.createImage(buffer);
        if (img == null) {
            return null;
        }

        RenderedImage ri = loadImage(img);
View Full Code Here

        Thread t = new Thread() {
                public void run() {
                    Filter filt = null;
                    try {
                        Toolkit tk = Toolkit.getDefaultToolkit();
                        Image img = tk.createImage(url);

                        if (img != null) {
                            RenderedImage ri = loadImage(img, dr);
                            if (ri != null) {
                                filt = new RedRable(GraphicsUtil.wrap(ri));
View Full Code Here

        }
       
        buffer = bos.toByteArray();

        Toolkit tk = Toolkit.getDefaultToolkit();
        final Image img = tk.createImage(buffer);
        if (img == null) {
            return null;
        }

        RenderedImage ri = loadImage(img);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.