Java online chat projects use SWT to quickly create a login window. The visual window Design replaces the default skin of the window (switch several skins that come with Swing, such as rectangles with rounded corners ),
After successful SWT Activation
A new JDialog
Adjust to Design view
The default view mode is BorderLayout. No matter how you drag it, it can only be placed in the east, west, and north-south locations.
Therefore, we adjust the view mode to AbsoluteLayout, so that we can drag the widget to any location we need.
It is found that the skin of this window is not very nice, and the text box and button are both Cartesian rectangles.
How can I change my skin?
Replace the Nimbus skin that comes with Swing
JFrame. setdefalooklookandfeeldecorated (true );
JDialog. setdefalookandfeeldecorated (true );
UIManager. setLookAndFeel ("javax. swing. plaf. nimbus. NimbusLookAndFeel ");
Add text box label button
Set window title
Setting the window size cannot be modified. Setting resizable to false
Window effects include: