Preventing JTextFields from Resizing When Using SetText()
I have a GUI with several JTextFields that I populate with setText() with data read from a database. When the data read is longer than the size of the JTextField, the field resizes itself to accommodate the length of the data. However, this causes the whole GUI to become off-balance and look bad. I'd rather just have the data side-scrollable in the field without the size of the field changing.
I initially designed the GUI with NetBeans. I found that there is a constant value called Horizontal Resizable that you can toggle with a checkbox. Some of the text boxes were checked and some weren't. I unchecked all of the check boxes, but unfortunately I'm still having the same problem. It actually caused all of the text fields to lose alignment with each other, plus it didn't fix the initial problem. So I reverted back to the initial version.
I've also tried setMinimumSize() and setMaximumSize() to no avail. Does anyone have any ideas? I have this same problem with several of my applications, so I really need to figure out how to get this cleaned up. Thanks!

