JAL-3416 Add necessary logo to non-internal Frames
authorBen Soares <b.soares@dundee.ac.uk>
Wed, 9 Nov 2022 18:10:10 +0000 (18:10 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Wed, 9 Nov 2022 18:10:10 +0000 (18:10 +0000)
src/jalview/gui/JvOptionPane.java
src/jalview/io/JalviewFileChooser.java

index 5daf35c..5d69a53 100644 (file)
@@ -55,6 +55,7 @@ import javax.swing.UIManager;
 import javax.swing.event.InternalFrameEvent;
 import javax.swing.event.InternalFrameListener;
 
+import jalview.util.ChannelProperties;
 import jalview.util.Platform;
 import jalview.util.dialogrunner.DialogRunnerI;
 
@@ -925,7 +926,7 @@ public class JvOptionPane extends JOptionPane
               Platform.isJS() ? initialValue : initialValue_btn);
 
       JDialog dialog = joptionpane.createDialog(parentComponent, title);
-      dialog.setIconImage(null);
+      dialog.setIconImages(ChannelProperties.getIconList());
       dialog.setModalityType(modal ? ModalityType.APPLICATION_MODAL
               : ModalityType.MODELESS);
       dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
@@ -1000,7 +1001,7 @@ public class JvOptionPane extends JOptionPane
     else
     {
       JDialog dialog = this.createDialog(parentComponent, title);
-      dialog.setIconImage(null);
+      dialog.setIconImages(ChannelProperties.getIconList());
       dialog.setVisible(true); // blocking
       this.internalDialogHandleResponse();
       return;
index 5218255..6dbf4f8 100755 (executable)
@@ -53,6 +53,7 @@ import javax.swing.plaf.basic.BasicFileChooserUI;
 
 import jalview.bin.Cache;
 import jalview.gui.JvOptionPane;
+import jalview.util.ChannelProperties;
 import jalview.util.MessageManager;
 import jalview.util.Platform;
 import jalview.util.dialogrunner.DialogRunnerI;
@@ -647,7 +648,7 @@ public class JalviewFileChooser extends JFileChooser
   protected JDialog createDialog(Component parent) throws HeadlessException
   {
     JDialog dialog = super.createDialog(parent);
-    dialog.setIconImage(null);
+    dialog.setIconImages(ChannelProperties.getIconList());
     return dialog;
   }