jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [jmeter] vlsi commented on pull request #610: Add a switch to disable splash screen on startup
Date Wed, 19 Aug 2020 18:39:42 GMT

vlsi commented on pull request #610:

   > I fear, that it can come up behind the main window and irritate people, as JMeter
will seem to stop being responsive until the (possibly hidden?) splash screen is removed.
   That is valid.
   It looks like `JDialog` + `ModalityType.APPLICATION_MODAL` + `undecorated` nails it.
   The result looks like "splash screen is always above JMeter window. The main window is
**unclickable** as long as the splash is there, and the splash does not block other apps.
   --- a/src/core/src/main/java/org/apache/jmeter/
   +++ b/src/core/src/main/java/org/apache/jmeter/
   @@ -18,15 +18,16 @@
    package org.apache.jmeter;
    import java.awt.BorderLayout;
   +import java.awt.Frame;
    import javax.swing.Icon;
    import javax.swing.JComponent;
   +import javax.swing.JDialog;
    import javax.swing.JLabel;
    import javax.swing.JProgressBar;
   -import javax.swing.JWindow;
    import javax.swing.SwingUtilities;
    import javax.swing.border.EmptyBorder;
   @@ -40,7 +41,7 @@ import com.github.weisj.darklaf.icons.ThemedSVGIcon;
     * Splash Screen
     * @since 3.2
   -public class SplashScreen extends JWindow {
   +public class SplashScreen extends JDialog {
        private static final Logger log = LoggerFactory.getLogger(SplashScreen.class);
        private static final long serialVersionUID = 1L;
   @@ -53,6 +54,9 @@ public class SplashScreen extends JWindow {
            setLayout(new BorderLayout());
            add(loadLogo(), BorderLayout.CENTER);
            add(progressBar, BorderLayout.SOUTH);
   +        setModalityType(ModalityType.APPLICATION_MODAL);
   +        setAutoRequestFocus(true);
   +        setUndecorated(true);
   @@ -91,7 +95,6 @@ public class SplashScreen extends JWindow {
        public void showScreen() {
            SwingUtilities.invokeLater(() -> {
   -            setAlwaysOnTop(true);

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message