In here, I add items using the "add" button. Then, the names of the items, locations of the items and the size of the items will be displayed in the Boxes called "nameBox", "locationBox" and "sizeBox". "nameBox" contains JCheckBoxes and other two contains JLabels.
Now, the problem is, when I add items, the "nameBox" goes down, while other boxes are in their correct position. When I add more items, it goes more down. I am attaching two images explaining the normal look and with my Box Down problem. Please help me..>>
Are you better than me? Then please show me my mistakes..
Thanks for the reply. Anyway, the code I have posted before is less than half of my original code. However, I edited it and reduced the code as much as I can. There is no way I can reduce it to 30 lines, because it will never address my original issue. Please help.
Joined: Jun 09, 2003
it seems your problem is:
1) the differing heights of the checkbox and those of the labels.
2) the addition of a JPanel to both locationBox and sizeBox in addItems()
add the 2 indicated lines in AddAction()
also, don't call updateUI() directly, change updateInterface() to this