@ControllerpublicclassUserProfileComponentextendsJPanel {
@UIComponent(text = "Edit")
privateJButtoneditButton;
@OnClick(component = "editButton")
privatevoidonClick() {
System.out.println("Edit!");
}
@PostConstructprivatevoidsetupUI() {
add(editButton);
}
publicUserProfileComponent() {
setLayout(newFlowLayout());
}
}
@WinterApplicationpublicclassAppTest {
@UIComponent(text = "Main Frame")
privateJFramemainFrame;
@UIComponent(text = "Click Me!")
privateJButtonclicker;
@OnClick(component = "clicker")
privatevoidonClick() {
System.out.println("Clicked!!!");
}
@UIContainer(children = { "clicker" })
privateUserProfileComponentprofileContainer;
@EntryPointpublicvoidinit() {
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.setSize(300, 200);
mainFrame.setLayout(newFlowLayout());
mainFrame.add(profileContainer);
mainFrame.setVisible(true);
}
publicstaticvoidmain(String[] args) {
WinterApplicationRunner.run(AppTest.class);
}
}Uh oh!
There was an error while loading. Please reload this page.
Latest commit
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|