NetBeans has a visual GUI builder at SWING - Form Builder. On it I have 2 questions for those who used it:

  1. By default, the component table when creating has columns of the same width, how to change them?
  2. How to make an invisible component of JLabel? setVisible does not offer, because you can probably change some property, which I do not know.

    1 answer 1

    change the size of the first column

    jTable.getColumnModel().getColumn(0).setMinWidth(40); 

    if you want to make the column size fixed, then

     jTable.getColumnModel().getColumn(0).setMaxWidth(40); 

    and what you do not like setVisible (true)?

    • and what you do not like setVisible (true)? - greshnik
    • if I am not mistaken, there is a tab there - there are most of the properties there, if there is no one specifically for the individual columns - there definitely is an opportunity to add properties to the objects yourself - Gorets