import javafx.scene.layout.HBox; public class MainView extends HBox { InputPanel inputPanel; public MainView() { this.inputPanel = new InputPanel(); this.inputPanel.setText("Valami"); this.getChildren().add(this.inputPanel); } }