Package java.awt

Examples of java.awt.Toolkit.createImage()


  private AccountsDataAdapter adapter;
 
  public AccountsListWindow() {
    java.net.URL url = ClassLoader.getSystemResource("ethereum-icon.png");
        Toolkit kit = Toolkit.getDefaultToolkit();
        Image img = kit.createImage(url);
        this.setIconImage(img);
        setTitle("Accounts List");
        setSize(700, 500);
        setLocation(50, 180);
        setResizable(false);
View Full Code Here


        setMaximumSize(size);
        setMinimumSize(size);

        URL url = ClassLoader.getSystemResource("MinesLogo.png");
        Toolkit kit = Toolkit.getDefaultToolkit();
        icon = kit.createImage(url);

        image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
        pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
        screen = new Screen(WIDTH, HEIGHT);
        mines = new Minefield(FIELD_X, FIELD_Y, NUM_MINES, MINE_SIZE, MINE_SIZE, BUFFER, EDGE, screen);
View Full Code Here

        pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
        screen = new Screen(WIDTH, HEIGHT);
       
        URL url = ClassLoader.getSystemResource("SnakeLogo.png");
        Toolkit kit = Toolkit.getDefaultToolkit();
        icon = kit.createImage(url);
    }

    public void init() {
        key = new Keyboard();       
        snake = new SnakeCharacter(WIDTH, HEIGHT, screen, WIDTH / 2, HEIGHT / 2, key, speed);
View Full Code Here

    Log.d(LOG_TAG, "createAndShowGUI");
    flingFrame = new FlingFrame(appId);
    // change the default app icon; might not work for all platforms
    URL url = ClassLoader.getSystemResource("com/entertailion/java/fling/resources/logo.png");
    Toolkit kit = Toolkit.getDefaultToolkit();
    Image img = kit.createImage(url);
    flingFrame.setIconImage(img);
    flingFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    // flingFrame.setSize(420, 250);
    flingFrame.setSize(420, 275); // with scrubber
    flingFrame.setLocationRelativeTo(null);
View Full Code Here

  private Image loadFrameIcon() {
    Toolkit toolkit= Toolkit.getDefaultToolkit();
    try {
      java.net.URL url= BaseTestRunner.class.getResource("smalllogo.gif");
      return toolkit.createImage((ImageProducer) url.getContent());
    } catch (Exception ex) {
    }
    return null;
  }
View Full Code Here

 
  public Image loadImage(String name) {
    Toolkit toolkit= Toolkit.getDefaultToolkit();
    try {
      URL url= BaseTestRunner.class.getResource(name);
      return toolkit.createImage((ImageProducer) url.getContent());
    } catch (Exception ex) {
    }
    return null;
  }
 
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.