#JavaFX, remove default ListView properties
1 messages · Page 1 of 1 (latest)
<@&987246487241105418> please have a look, thanks.
i am not sure what element to edit for that
here is my listview fxml
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<StackPane fx:controller="jakebball11.liveplayercount.controller.GameListController" xmlns:fx="http://javafx.com/fxml" style="-fx-background-color: #1e1e13">
<ListView fx:id="listView" style="-fx-background-color: #1e1e1e; -fx-border-color: transparent; -fx-font-size: 16px; -fx-text-fill: white;">
</ListView>
</StackPane>
Detected code, here are some useful tools:
Formatted code
< ? xml version = "1.0"encoding = "UTF-8" ? > < ? import java.lang. * ? > < ? import java.util. * ? > < ? import javafx.scene. * ? > < ? import javafx.scene.control. * ? > < ? import javafx.scene.layout. * ? > < StackPane fx : controller = "jakebball11.liveplayercount.controller.GameListController"xmlns : fx = "http://javafx.com/fxml"style = "-fx-background-color: #1e1e13" > < ListView fx : id = "listView"style = "-fx-background-color: #1e1e1e; -fx-border-color: transparent; -fx-font-size: 16px; -fx-text-fill: white;" > < / ListView > < / StackPane >
and my controller,
@FXML
private ListView<VBox> listView;
public void initialize() throws IOException {
FXMLLoader loader = new FXMLLoader(Main.class.getResource("AddGameItem.fxml"));
VBox addGameItem = loader.load();
listView.getItems().clear();
listView.getItems().add(addGameItem);
System.out.println(listView.getItems());
}