public void start() {
if(current != null){
current.show();
return;
}
Form hi = new Form("Hi World", BoxLayout.y());
hi.add(new Label("Hi World"));
Button testButton = new Button("OPEN DIALOG");
hi.add(testButton);
testButton.addActionListener(l -> {
InteractionDialog id = new InteractionDialog(BoxLayout.y());
for (int i = 1; i <= 5; i++) {
Label text = new Label("Label " + i);
id.add(text);
}
Button disposeButton = new Button("EXIT");
disposeButton.addActionListener(l2 -> {
id.dispose();
});
id.add(disposeButton);
id.setAnimateShow(true);
id.showPopupDialog(testButton); //This does not add components to the InteractionDialog
// id.show(10, 10, 10, 10); //This will show an InteractionDialog with components
});
hi.show();
}