column

How to create a JComboBox in a JTable column with JFormDesigner

In a heavy day of JFormDesigner use, I just learned how to create a JComboBox in a column in a JTable, using only JFormDesigner.

First, create your JTable in JFormDesigner. I'll skip the details here, hoping that process is easy enough. Then, click the ellipsis button for the model property in the Properties list. This brings up the JTable model editor.

JFormDesigner - how to set the column width of a JTable

I just noticed that you can set the preferred size of a column in a JTable using JFormDesigner. If you're looking at a JTable in the normal JFormDesigner view, click the ellipsis button for the model property in the Properties list. This brings up the JTable model editor.

Next, click a cell in the column you want to modify. Then on the bottom-right of this dialog you'll see a few fields labeled "Pref. Width", "Min. Width", and "Max. Width". Just type in a value you want for the preferred width of your column.