# HG changeset patch # User wenzelm # Date 1609880280 -3600 # Node ID 7460f92d63fc4e3331c013c86808c41a660249f5 # Parent f996348d28ee940acedc5538de180c184d04b1bd prefer official Java 9 operations; diff -r f996348d28ee -r 7460f92d63fc src/Pure/GUI/gui.scala --- a/src/Pure/GUI/gui.scala Tue Jan 05 21:47:36 2021 +0100 +++ b/src/Pure/GUI/gui.scala Tue Jan 05 21:58:00 2021 +0100 @@ -7,7 +7,7 @@ package isabelle import java.awt.{Component, Container, Font, Image, Insets, KeyboardFocusManager, Window, Point, - Rectangle, Dimension, GraphicsEnvironment, MouseInfo, Toolkit} + Rectangle, Dimension, GraphicsEnvironment, MouseInfo, Toolkit, Taskbar} import java.awt.font.{FontRenderContext, LineMetrics, TextAttribute, TransformAttribute} import java.awt.geom.AffineTransform import javax.swing.{ImageIcon, JButton, JDialog, JFrame, JLabel, JLayeredPane, JOptionPane, @@ -164,11 +164,7 @@ def set_application_icon() { if (Platform.is_macos) { - val image = isabelle_image_large() - val app = - Class.forName("com.apple.eawt.Application") - .getDeclaredMethod("getApplication").invoke(null) - app.getClass.getDeclaredMethod("setDockIconImage", classOf[Image]).invoke(app, image) + Taskbar.getTaskbar.setIconImage(isabelle_image_large()) } }