From: Ben Soares Date: Mon, 29 Apr 2024 07:43:55 +0000 (+0100) Subject: JAL-4398 Instantiate (static) JMenu windowMenu at the same time as the other (instanc... X-Git-Tag: Release_2_11_4_0~14^2~11^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8183ef1205ddc7ddc2aa40def6e81917c9c23940;p=jalview.git JAL-4398 Instantiate (static) JMenu windowMenu at the same time as the other (instance) JMenus for same context (FlatLaf?) settings --- diff --git a/src/jalview/jbgui/GDesktop.java b/src/jalview/jbgui/GDesktop.java index 3d606e3..90b8024 100755 --- a/src/jalview/jbgui/GDesktop.java +++ b/src/jalview/jbgui/GDesktop.java @@ -48,7 +48,7 @@ import jalview.util.Platform; public class GDesktop extends JFrame { - protected static JMenu windowMenu = new JMenu(); + protected static JMenu windowMenu = null; JMenuBar desktopMenubar = new JMenuBar(); @@ -110,6 +110,13 @@ public class GDesktop extends JFrame public GDesktop() { super(); + + // instantiate here to set same context (e.g. font) as other menus + if (windowMenu == null) + { + windowMenu = new JMenu(); + } + try { jbInit();