It's a lot of trouble for me to write swing by myself, but luckily someone wrote a plugin for myeclipse called Windowbuilder
Install WindowBuilder
The first step, open Myeclipse, find install from catalog in the menu bar above, and then wait for the window to pop up
The second step, enter swing in the catalog window, you can see windowBuilder
The third step, click install, then wait for the installation to complete, restart myeclipse after the installation is complete, you can use it
Using WindowBuilder
The first step, we first new a common java project
The second step, when creating a class, use the application window under Swing Designer under the WindowBuilder package
The third step is to use it happily, just drag it directly.