package bug; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.HBox; 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 blackBackgroundView1; protected ImageView blackBackgroundView2; protected ImageView blackBackgroundView3; @Override public void start(final Stage stage) throws Exception { HBox pane = new HBox(); blackBackgroundView1 = new ImageView(); blackBackgroundView2 = new ImageView(); blackBackgroundView3 = new ImageView(); load(blackBackgroundView1, "/bug/disposal_background.gif"); load(blackBackgroundView2, "/bug/disposal_previous.gif"); load(blackBackgroundView3, "/bug/disposal_previous_2.gif"); pane.getChildren().add(blackBackgroundView1); pane.getChildren().add(blackBackgroundView2); pane.getChildren().add(blackBackgroundView3); Scene scene = new Scene(pane, 600, 300); stage.setScene(scene); stage.show(); } protected void load(ImageView blackBackgroundView1, String path) { Image image = new Image(getClass().getResourceAsStream(path)); blackBackgroundView1.setImage(image); } }