package bug; import javafx.application.Application; import javafx.event.EventHandler; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ButtonBuilder; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; public class Bug extends Application{ /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here launch(Bug.class,args); } protected ImageView blackBackgroundView; @Override public void start(final Stage stage) throws Exception { HBox pane = new HBox(); blackBackgroundView = new ImageView(); load("/bug/finite_loop_repeated.gif"); pane.getChildren().add(blackBackgroundView); Scene scene = new Scene(pane,300,300); stage.setScene(scene); stage.show(); } protected void load(String path) { Image image = new Image(getClass().getResourceAsStream(path)); blackBackgroundView.setImage(image); } }