JFrame As Secondary GUI Possibility

I created a JFrame with a list output and radio buttons for different autonomous modes in the off season and finally had a chance to run it on the robot, but it throws a NoClassDefFoundError. Is it even possible to run a JFrame on the roborio? I’m not super experienced with how the roborio and driverstation interact but I’m fairly fluent in java. I have the JFrame class and then the robot class in one package so that I can just call JFrameClass.addSomething("") from the robot class. I don’t have the code with me, but it seems like more of a compiling error than actual code.

This particular error means the classpath at runtime cannot find a class. It doesn’t have anything to do with compiling. It’s more to do with how you deploy to your environment.

JFrame itself is a GUI-based class that will initialize a display environment under the covers. Unrelated to robotics, a ‘headless’ server is one that doesn’t have a video card output at all. Running a class that initializes a JFrame on a headless server throws a runtime error, though I don’t remember the specifics.

If you’re running the java.swing.JFrame class on the RobotRIO, then I suspect that’s the source of your error. The JFrame class is meant to be launched from your driver’s station laptop, and the control code should connect to the RoboRIO’s IP/ports where your RoboRIO code is publishing data.

The roborio doesn’t have a screen or possible video output, so you can’t use a JFrame or any type of UI on it. I also would imagine that these classes aren’t on the roborio because they cannot be used.

Thank you both. I forgot to mention this as a possibility as well. I think the 2016 has solved everything I was trying to do anyway but I just needed some closure.