This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
I'm using GridBagLayout in a complex form and I simply want to have each 'cell' be exactly the same width, when the size of the window changes the width of each cell scales accordingly, but each cell always remains the same size as the other. This way I can simply place items by specifying the location and number of cells it takes and have it always scale accordingly. My problem is simple, the size of my cells are being adjusted because JLabels want more space, it's causing problems. I'm guessing that it's the JLabels minimum size being set based upon the text, which in turn causes the cell(s) it is in to modify their sizes to accomodate it. I don't want this! I dont' care if the text in the label gets cut off, I want to width of each cell to stay the same for each cell REGARDLESS of whether or not the components contained in them think they need more room. How do I accomplish this? I thought I could just override each components minimumSize but that doesn't seem to work! I tried using columnWeights and columnWidths in GridBagLayout but that didn't seem to have any affect either! Help!!!