I try to use the Maven project throw downloading the tamplate from web side. I have already use below command to create the gui files and had succeed.
mvn cn1:create-gui-form -DclassName=com.example.myapp.MyGUI
Then, I use below command to show the GUI builder tool and add two buttons.
mvn cn1:guibuilder -DclassName=com.example.myapp.MyGUI
Third, I program as below in main app but the buttons do not show.
public class MyApp extends Lifecycle {
// Resources theme = UIManager.initFirstTheme("/theme");
@Override
public void runApp() {
// Form hi = new Form("Hi World", BoxLayout.y());
// Button helloButton = new Button("Hello World");
// hi.add(helloButton);
// helloButton.addActionListener(e -> hello());
// hi.getToolbar().addMaterialCommandToSideMenu("Hello Command",
// FontImage.MATERIAL_CHECK, 4, e -> hello());
// 使用GUI Builder
MyGUI hi = new MyGUI();
hi.show();
}
Below is my project structure:
Could any body help me?