Notification (@NlsContexts.NotificationContent String message) { Notification notification = NotificationGroupManager.getInstance().getNotificationGroup("scrolling-capabilities-debug") .createNotification(message, NotificationType.INFORMATION); notification.notify(null); Timer timer = new Timer(NOTIFICATION_TIMEOUT, event -> notification.expire()); timer.setRepeats(false); timer.start(); return notification; }