This answer shows how the ellipses arise; instead of trying to defeat them, the better approach is to add your JTable
to a layout that allows the table to adjust as the enclosing Window
is resized. In this example, the table fills BorderLayout.Center
, the default for JFrame
. For a more appealing initial appearance,
You can override
getPreferredScrollableViewportSize()
as shown.You can use Changing Column Widths as needed.
Addendum: Although I don't recommend it from a usability perspective, you can omit the ellipsis in a custom subclass of DefaultTableCellRenderer
that uses a custom LabelUI
and overrides layoutCL()
, as shown here and here.