Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123113

<ImageView> does not working if initilized in controller

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7u6
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      javafx 2.2

    • Subcomponent:

      Description

       
      FXML code -
      ...
      <TreeItem expanded="true" value="1">
      <graphic>
      <ImageView fx:id="folderImageView"/>
      </graphic>
                            <children>
                              <TreeItem value="11" />
                            </children>
                          </TreeItem>
                          
                          <TreeItem expanded="true" value="2">
      <graphic>
      <ImageView fx:id="folderImageView"/>
      </graphic>
                            <children>
                              <TreeItem value="2" />
                            </children>
                          </TreeItem>
      ...

      Its controller code -

      public class LController implements Initializable {
      ..
      @FXML ImageView folderImageView;
      ..
      public void initialize(URL location, ResourceBundle resources) {
      folderImageView.setImage(new Image("/resource/b.png"));
      }


      image b.png is only displayed, in last TreeItem (i.e. which has value=2)

      Can you please suggest?

      Regards,
      Abhishek




        Attachments

          Activity

            People

            • Assignee:
              ekrejcir Eva Krejčířová (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: