How can I align values in JTable columns in the middle?
center all columns with string data
DefaultTableCellRenderer centerRend = new DefaultTableCellRenderer(); centerRend.setHorizontalAlignment(JLabel.CENTER); table.setDefaultRenderer(String.class, centerRend);
Source: https://ru.stackoverflow.com/questions/923555/More articles:The changing background of the button (button)Angular can not change the date in the templateHow to transfer data between child components?Transferring values from data- * to input in a popup windowReading keys in console on linux, pynput moduleUsing Modules in Imported ModulesError in c ++ programthe onchange event is triggered when the browser window is minimizedHow to compensate for the shift in the scrollview when resizing elements?Template function specialization for std :: stringAll Articles