Adding Swing UI Components to an IntelliJ Tool Window
In the previous article, I explained how to add a Tool Window to an IntelliJ plugin. In this article, I’ll walk through adding content to that tool window using the Swing GUI framework. Specifically, I’ll be using the GUI Designer built into IntelliJ, a visual layout tool for Swing applications.
Note that the GUI Designer does not support Kotlin. Because of this, you should use the new plugin project wizard to create your plugin instead of the plugin template on Github.
Adding a Simple Title
Whenever trying something new, its always a good idea to start small. Our first assignment will be to add a title to our tool window that says “Flutter Fast”. That’s it.
Creating a New GUI Form
Navigate to the root of your new Java project and right-click on the directory with your project’s name (the one that looks like this -> com.example.name). Then, click your way from New -> Swing UI Designer -> GUI Form and name your new file (source).
Completing this step will create two files: one .form file and one .java file. By default, the designer will bind the form to a Java class of the same name.
After the file is created, you will be viewing the .form file in IntelliJ’s GUI Designer…