Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String imgfile = "elephant.png";
- String homepath = System.getProperty("user.home");
- String imgpath = new java.io.File(homepath, imgfile).toString();
- Image img = new Image(display, imgpath);
- Label imagelabel = new Label(shell, SWT.NONE);
- imagelabel.addPaintListener(new ImageDrawPaintListener(img, 0, 0));
- imagelabel.addPaintListener(new ImageDrawPaintListener(img, 50, 50));
- imagelabel.setSize(400, 400);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement