Zeman4323
asked on
JLabel Sizing
I basically have an application in which I want to use Jlabels in as tiles. I want to create a 4x4 grid of JLabels that contain one letter each.
ahdf
idus
ywnf
oapd
Something like that. I have my labels rendering onto my window except I can't seem to change the size of the labels. The Labels seem to stay the size of the letter no matter what size i specify with setSize. I was wondering how I would go about making all of the labels squares. Each square would have a letter in the middle and the blank space would be filled with a background color.
If anyone could help me out it would be greatly appreciated.
Thanks
~Matthew
ahdf
idus
ywnf
oapd
Something like that. I have my labels rendering onto my window except I can't seem to change the size of the labels. The Labels seem to stay the size of the letter no matter what size i specify with setSize. I was wondering how I would go about making all of the labels squares. Each square would have a letter in the middle and the blank space would be filled with a background color.
If anyone could help me out it would be greatly appreciated.
Thanks
~Matthew
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://java.sun.com/docs/books/tutorial/uiswing/layout/grid.html