JavaFX ImageView 🖼️
78.1 هزار بار بازدید -
4 سال پیش
-
JavaFX ImageView node tutorial example
JavaFX ImageView node tutorial example explained
#JavaFX #ImageView #node
// ******************* Controller.java *******************
package application;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
public class Controller {
//ImageView is a Node used for painting images loaded with Images
// Image = picture
// ImageView = picture frame
@FXML
ImageView myImageView;
Button myButton;
Image myImage = new Image(getClass().getResourceAsStream("shrek2.jpg"));
public void displayImage() {
myImageView.setImage(myImage);
}
}
// ********************************************************
Bro Code merch store 👟 :
===========================================================
https://teespring.com/stores/bro-code-5
===========================================================
#JavaFX #ImageView #node
// ******************* Controller.java *******************
package application;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
public class Controller {
//ImageView is a Node used for painting images loaded with Images
// Image = picture
// ImageView = picture frame
@FXML
ImageView myImageView;
Button myButton;
Image myImage = new Image(getClass().getResourceAsStream("shrek2.jpg"));
public void displayImage() {
myImageView.setImage(myImage);
}
}
// ********************************************************
Bro Code merch store 👟 :
===========================================================
https://teespring.com/stores/bro-code-5
===========================================================
4 سال پیش
در تاریخ 1399/11/13 منتشر شده
است.
78,194
بـار بازدید شده