SmartDashboard Window size not saving

Hey everybody!

We recently switched Driver Station computers due to the fact that our old classmate kept causing SmartDashboard to crash. We are now using a plastic MacBook running Windows 7 through BootCamp.

The SmartDashboard launches fine, but the window size is too small on launch (1024x400 to be exact). We are able to change the window size just fine through File > Preferences but, when we reopen the dashboard, the window size resets to 1024x400. We know that the layout was saved because we added a second camera feed when we set up the new Driver Station, and it was still showing when we relaunched.

How can we fix this? Thanks in advance!

There’s currently no fix for that when you are running in “competition” mode (which means you don’t see the frame around the window).

One option is to not run it in competition mode. To do that, go to Program Files\FRCDashboard\launcher.bat and remove the word competition (or “-competition”, I don’t remember if there is a hyphen).

When your in “competition” mode, the size of the window is hard coded into the program. However, it’s quite easy to change, all you have to do is change one line in the source (which is downloadable from I have successfully changed our dashboard to display at 1366x500. If you need any help, or just want me to compile you one with your resolution hard coded, PM me.

Thanks for the help guys! I’ve passed this on to our lead programmer. Good luck for those going to worlds!

Sorry about the annoyance, we’ll try to fix it for 2013.


The problem seems to be at at line 119:

// Set the size / look
        if (competition) {
            setPreferredSize(NETBOOK_SIZE); //1024x400 - this is your problem
            setLocation(0, 0);
        } else {
            setMinimumSize(MINIMUM_SIZE); //300x200

            // Closing operation is handled manually

            DashboardPrefs prefs = DashboardPrefs.getInstance();
            setPreferredSize(new Dimension(prefs.width.getValue(), prefs.height.getValue())); //This is the dimension stored in the save file
            setLocation(prefs.x.getValue(), prefs.y.getValue());

So the DashboardFrame will automatically be set to 1024x800 if you’re in competition mode. The easiest (temporary) fix until the 2013 release would be to change



setPreferredSize(new Dimension(width, height));

with (width, height) being based upon the size of your screen.

A better stopgap would be:

setPreferredSize(new Dimension(prefs.width.getValue(), prefs.height.getValue()));

because that will now save your screen size, and use the saved screen size.