0
private void createImage()
{ this.setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(getClass().getResource("icon_Admission.png")));
}

I have made a small Java application which is basically an admission system and setting icons to JFrame and task bar but it appears to be too small. How can I resize them the one at top left corner and the highlighted one in task bar equal to left one?

enter image description here

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Abdul Wahab
  • 99
  • 1
  • 2
  • 11
  • Possible duplicate of [Sizes of frame icons used in Swing](http://stackoverflow.com/questions/18224184/sizes-of-frame-icons-used-in-swing) – Aaron Aug 26 '16 at 03:03
  • To sum up the link by @Aaron, the 'ideal' sizes of icons varies so much from PC to PC that your best bet is to provide as many sizes as you can, and let Java decide at run-time which icons to use. – Andrew Thompson Aug 26 '16 at 03:20
  • As an aside, icons are typically scaled up/down if needed at a different size. How much padding surrounds the image seen above? – Andrew Thompson Aug 26 '16 at 03:23
  • Just like @andrew-thompson said, you could try to crop the transparent parts of the icon to reduce the padding of the image, and in turn scales the image larger. – Aaron Aug 26 '16 at 03:29

0 Answers0