detect
package face7; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.layout.StackPane; import javafx.stage.Stage; import javafx.scene.Group; import javafx.scene.image.*; import javafx.scene.shape.Rectangle; import javafx.scene.image.Image; import javafx.scene.paint.Color; public class pro extends Application { Image img; ImageView imv; Rectangle r; int rx,ry; public static void main(String args) { launch(args); } @Override public void start(Stage primaryStage) { String pic; pic="http://img.ske48.co.jp/profile/large/matsui_rena.jpg"; catchdata sub2=new catchdata(); sub2.makedata(pic); rx=sub2.rx; ry=sub2.ry; img = new Image(pic); imv = new ImageView(img); imv.setFitWidth(300); imv.setFitHeight(365); imv.setLayoutX(50); imv.setLayoutY(50); int s,sx; r=new Rectangle(); r.setLayoutX(rx+50); r.setLayoutY(ry+50); r.setWidth(20); r.setHeight(20); Color c = Color.rgb(100,100,100); r.setFill(c); Group root = new Group(); Scene scene = new Scene(root, 500, 500); root.getChildren().add(imv); root.getChildren().add(r); primaryStage.setTitle("face"); primaryStage.setScene(scene); primaryStage.show(); } }
}