5
thanks to jewelsea 버튼으로 채워진 TableView에 열을 만드는 것이 가능하다는 것을 알고 있습니다.FXML (JavaFX)의 버튼 열 정의 방법
FXL에 을 직접 정의 할 수 있는지 알고 싶습니다. 예를 들어
, 다른 종류의 사람이 수행클래스 사람 : 하나와이 요소를 추가 할 수 있습니다
<TableView fx:id="table" layoutY="50.0" prefHeight="350.0" prefWidth="600.0">
<columns>
<TableColumn prefWidth="79.5" text="date of birth">
<cellValueFactory>
<PropertyValueFactory property="birthDate" />
</cellValueFactory>
</TableColumn>
</columns>
</TableView>
그리고 다음 FXML에서 다음
private final SimpleStringProperty birthDate = new SimpleStringProperty("");
: @FXML private TableView<Person> table;
//...
table.getItems().add("12/02/1452");
버튼을 사용하여 동일한 방법을 달성하는 방법은 무엇입니까?
글쎄 Scene Builder에서는 가능하지 않습니다. –
나는 이것이 불가능하다고 생각한다. 코드 위에 셀 팩터를 설정해야합니다. – Marcel