1 Reply Latest reply: Dec 19, 2012 7:34 AM by Cobra Ice RSS

    TableColumn Label not filling entire column

    Celer
      All

      I have a table column with a Label but when I set the text and say set the background color that does not fill the entire TableColumn.
        • 1. Re: TableColumn Label not filling entire column
          Cobra Ice
          Not sure if you mean a column in a row ?

          You can use:
          tableView.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
          This will expand the columns to fit the displayable area.

          You can then use setPrefWidth(Double.MAX_VALUE) on the label to tell it to use all space made available by the expanded table cell.
          Label labelToDisplayInTab = new Label("bla bla");
          labelToDisplayInTab.setPrefWidth(Double.MAX_VALUE);
          Hope this helps.
          If not then please supply a bit more information so that I can figure out exactly where your problem is.