From 8183ef1205ddc7ddc2aa40def6e81917c9c23940 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Mon, 29 Apr 2024 08:43:55 +0100 Subject: [PATCH] JAL-4398 Instantiate (static) JMenu windowMenu at the same time as the other (instance) JMenus for same context (FlatLaf?) settings --- src/jalview/jbgui/GDesktop.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); -- 1.7.10.2