I want to adjust the column widths seperately. Not all having same width.

here's my code:

    table = new JTable();
    table.setMinimumSize(new Dimension(6, 0));
    table.setMaximumSize(new Dimension(9, 0));
    table.setIntercellSpacing(new Dimension(9, 1));
    table.setBackground(new Color(153, 255, 153));
    table.setFont(new Font("Segoe UI Semibold", Font.BOLD, 17));
    table.addMouseListener(new MouseAdapter() {

here's what it looks like:

my table

  • 1
    I hope that this data is masked, random data. – Kain0_0 Jan 11 at 4:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.