Multiple windows in eclipse window builder

I am using Google Window Builder for eclipse to create a user interface aspect of my program. I need to create a settings window so that the user can change different settings for the program. I want the user to be able to click the "Settings" button in the menu to open a separate window. The problem I am facing is that I do not know how to visually create or add components to this separate window through Window Builder. Is there a way to create a jpanel that is not a child of the main jframe program through Window Builder?

+4
source share
1 answer

Right-click the package in which you want to save the file for a new window. Go to "New -> Other" and select "WindowBuilder -> Swing Designer -> JDialog". Write a name for the class of the new window. This will bring up the editor, select the “Design” tab at the bottom of the window. Now you can customize this new window.

To open this window from the main JFrame, you need to do the following:

MyNewWindowClass newWindow = new MyNewWindowClass(); newWindow.setVisible(true); 
+8
source

Source: https://habr.com/ru/post/1446153/


All Articles