import javafx.application.*; import javafx.stage.*; import javafx.scene.*; import javafx.scene.image.*; public class Test extends Application { static boolean doscale; public void start(Stage stage) { Image img = new Image("flower.jpg"); ImageView iv = new ImageView(img); if (doscale) iv.setScaleX(0.8); iv.setOpacity(0.3); Scene scene = new Scene(new Group(iv), 500, 500); stage.setScene(scene); stage.setVisible(true); } public static void main(String argv[]) { doscale = (argv.length > 0); launch(Test.class, argv); } }