Guest User

Untitled

a guest
Jan 16th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. button.setBackgroundImage(image);
  2.  
  3. Button button = new Button(buttonParent, SWT.TRANSPARENT);
  4. InputStream is = getClass().getResourceAsStream("my_image.png");
  5. ImageData imageData = new ImageData(is).scaledTo(16, 16);
  6. Image image = new Image (button.getDisplay(), imageData);
  7. button.setImage(image);
Add Comment
Please, Sign In to add comment