コード例 #1
0
 public void showAbout() {
   Alert alert = new Alert(Alert.AlertType.INFORMATION);
   alert.setTitle("О программе");
   alert.setHeaderText("Grain");
   alert.setContentText("Программа для расчета цены за партию зерна.");
   alert.show();
 }
コード例 #2
0
  private void confirmAlert() {
    Alert alert = new Alert(Alert.AlertType.INFORMATION);
    alert.setTitle("Item Accepted");
    alert.setHeaderText(null);
    alert.setContentText("Item #" + itemCount + " accepted.");

    alert.show();
  }
コード例 #3
0
  private void bookNotFoundAlert(String id) {
    Alert alert = new Alert(Alert.AlertType.INFORMATION);
    alert.setTitle("Book Not on File!");
    alert.setHeaderText(null);
    alert.setContentText("Book ID: " + id + " is not in our inventory.");

    alert.show();
  }
コード例 #4
0
  private void invoiceAlert(String message) {
    Alert alert = new Alert(Alert.AlertType.INFORMATION);
    alert.setTitle("Invoice");
    alert.setHeaderText(null);
    alert.setContentText(message);
    alert.getDialogPane().setStyle(" -fx-max-width:500px; -fx-pref-width: 500px;");

    alert.show();
  }