title: Strange control widths in JavaFX 2?
body: <p>I am new to JavaFX 2 and confused about the default widths of ComboBox and ListView. I would expect the ComboBox to be wider, so that the text "the prompt text" would be completely visible, for the ListView I would expect it to be smaller, only as wide as necessary. Code and screenshot following below. </p>
  
  <p>1) How can I achieve that ComboBox and Listview are both sized to the width they need?</p>
  
  <p>2) How to make both controls the same width (therefore the maximum out of both widths), is it possible to create some kind of link between the widths of both? I am especially looking for an elegant solution for FXML.</p>
  
  <p>Thanks for any hint!</p>
  
  <pre><code>@Override
  public void start(Stage primaryStage) {
      ComboBox&lt;String&gt; comboBox = new ComboBox&lt;String&gt;();
      comboBox.setPromptText("the prompt text");
      ObservableList&lt;String&gt; items = FXCollections.observableArrayList();
      items.addAll("item 1", "item 2");
      comboBox.setItems(items);
  
      ListView&lt;String&gt; list = new ListView&lt;String&gt;();
      ObservableList&lt;String&gt; items2 =FXCollections.observableArrayList (
          "blue", "red");
      list.setItems(items2);
  
      VBox vBox = new VBox();
      vBox.getChildren().addAll(comboBox, list);
  
      primaryStage.setScene(new Scene(vBox, 200, 300));
      primaryStage.show();
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/bAVrg.png" alt="enter image description here"></p>