Professional Documents
Culture Documents
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ResourceBundle;
import javafx.embed.swing.SwingFXUtils;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
/**
*
* @author owner
*/
public class FXMLDocumentController implements Initializable {
@FXML
private Label label;
@FXML
private Button button;
@FXML
private ImageView imageview;
@FXML
void handleButtonAction(ActionEvent event) throws ClassNotFoundException,
SQLException, IOException {
Class.forName("com.mysql.jdbc.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/technorev_mis", "root",
"");
}
os.close();
is.close();
Image imagex = new Image("file:photo.jpg",500,500,true,true);
imageview.setImage(imagex);
}
}
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}