import java.net.URL; import java.util.ResourceBundle; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.print.PrinterJob; import javafx.scene.Node; import javafx.scene.control.Button; import javafx.scene.control.DatePicker; import javafx.scene.control.Label; import javafx.scene.control.RadioButton; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.control.ToggleGroup; import javafx.scene.input.MouseEvent; import javafx.scene.layout.AnchorPane; import javafx.scene.layout.FlowPane; /** * FXML Controller class * * @author Mohammed */ public class Page1Controller implements Initializable { @FXML private AnchorPane AnchorID; @FXML private FlowPane FlowID; @FXML private TextField text3; @FXML private DatePicker datepicker4; @FXML private DatePicker datepicker11; @FXML private TextField text12; @FXML private TextField text13; @FXML private DatePicker datepicker14; @FXML private TextField text15; @FXML private TextField text16; @FXML private TextField text17; @FXML private TextField text18; @FXML private DatePicker datepicker19; @FXML private DatePicker datepicker20; @FXML private TextField text21; @FXML private TextField text22; @FXML private TextField text23; @FXML private TextField text24; @FXML private TextField text25; @FXML private TextField text26; @FXML private TextField text27; @FXML private TextField text28; @FXML private TextField text29; @FXML private TextField text30; @FXML private TextField text31; @FXML private TextArea text32; @FXML private TextField text33; @FXML private TextField text34; @FXML private DatePicker datepicker35; @FXML private TextField text36; @FXML private DatePicker datepicker37; @FXML private TextField text38; @FXML private TextField text39; @FXML private TextField text40; @FXML private TextField text41; @FXML private TextField text42; @FXML private TextField text43; @FXML private TextField text44; @FXML private TextField text45; @FXML private DatePicker datepicker46; @FXML private TextArea text47; @FXML private RadioButton text48no; @FXML private ToggleGroup radio48; @FXML private RadioButton text48yes; @FXML private TextField text49; @FXML private TextField text50; @FXML private DatePicker datepicker51; @FXML private DatePicker datepicker52; @FXML private TextField text53; @FXML private TextField text54; @FXML private TextField text55; @FXML private TextField text56; @FXML private TextField text57; @FXML private TextField text58; @FXML private DatePicker datepicker59; @FXML private TextField text60; @FXML private DatePicker datepicker61; @FXML private TextField text62; @FXML private TextField text63; @FXML private TextField text64; @FXML private TextField text65; @FXML private TextField text66; @FXML private DatePicker datepicker67; @FXML private TextField text68; @FXML private DatePicker datepicker69; @FXML private TextArea text70; @FXML private DatePicker datepicker71; @FXML private TextArea text72; @FXML private DatePicker datepicker73; @FXML private TextArea text74; @FXML private TextArea text75; @FXML private TextField text76; @FXML private TextField text77; @FXML private TextField text78; @FXML private TextField text79; @FXML private TextField text80; @FXML private TextField text81; @FXML private Label idlabel; @FXML private Button reportGenButton; @FXML private Button printButton; private Printissue application; /** * Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { // TODO } public void setApp(Printissue application) { this.application = application; } @FXML private void Col7MouseEntered(MouseEvent event) { } @FXML private void insertaction(ActionEvent event) { } @FXML private void queryaction(ActionEvent event) { } @FXML private void updateaction(ActionEvent event) { } @FXML private void reportGenAction(ActionEvent event) { } @FXML private void newaction1(ActionEvent event) { } @FXML private void printButtonFired(ActionEvent event) { PrinterJob job = PrinterJob.createPrinterJob(); job.showPrintDialog(application.getStage()); Node node=application.getPane(); if (job != null) { boolean success = job.printPage(node); if (success) { job.endJob(); } } } }