
I'm using a jpanel with an 8 by 8 grid layout of jlabels to which I'm adding images to represent a chess board. Is something wrong with the class, or with my implimentation of it, and how would I fix this? View Replies View Related Swing/AWT/SWT :: Getting Icons To Change Size With Window Resize? Jan 16, 2014 So I copied in the class, and initialized a different set of icons using the stretch icon class (specifically, the method that allows you to initialize a stretch icon from a filename), however, when I use these stretch icons, the result is the same. At first, I was using the ImageIcon class to initialize my icons, but as soon as I added these icons to the labels, the labels no longer changed size with the window (which I want to happen). Swing/AWT/SWT :: Getting Icons To Change Size With Window Resize Jan 19, 2014
#Netbeans jlabel icon resize how to#



Swing/AWT/SWT :: Getting Icons To Change Size With Window Resize?.Swing/AWT/SWT :: Getting Icons To Change Size With Window Resize.

I'm misusing the stretch icon class, or just generally what's going wrong/how to fix it? View Replies To attempt to fix this problem, I tried simplifying my code, reducing the program to two jlabels within the jpanel, for which I then tried to set the image in the same way. The board appears, but it does not resisize. , so I tried initializing the icons using one of the constructors in the class (the one that takes an image name and a boolean value for whether or not you want the resisizing to be proportionate (to maintain the aspect ratio)). Someone suggested I use their "Stretch Icon" class, found here. I would like the board to change size when the window changes size, and the grid layout accomplishes this succesfully, until I add the actual icons to the jlabels. I'm trying to create a chess program in java swing, and for the board I'm using an 8 by 8 array of jlabels stuck inside a jpanel with a grid layout. Swing/AWT/SWT :: Getting Jlabel Icons To Change Size With Window Resize? Feb 20, 2014
