Package ui.dialog

Class DialogUtils

java.lang.Object
ui.dialog.DialogUtils

public class DialogUtils extends Object
Utility class for displaying common dialog boxes. Provides convenience methods for error, info, and exception dialogs.
Version:
1.0
Author:
Spectrometer Control Software
  • Constructor Details

    • DialogUtils

      public DialogUtils()
  • Method Details

    • showErrorDialog

      public static void showErrorDialog(JFrame frame, String title, String message)
      Displays an error dialog with the specified title and message.
      Parameters:
      frame - the parent frame (can be null)
      title - the dialog title
      message - the error message to display
    • showInfoDialog

      public static void showInfoDialog(JFrame frame, String title, String message)
      Displays an information dialog with the specified title and message.
      Parameters:
      frame - the parent frame (can be null)
      title - the dialog title
      message - the information message to display
    • handleError

      public static void handleError(JFrame frame, String message, Exception ex)
      Handles an exception by printing the stack trace and showing an error dialog.
      Parameters:
      frame - the parent frame (can be null)
      message - the error description message
      ex - the exception that occurred