ServerList = new FormWindowSimple(...);
ServerList.addButton(new ElementButton("text"));
// add other buttons
p.getPlayer().showFormWindow(ServerList);
But how do I tell when a window button is pressedFirst of all, don't need to call setResponce(). Secondly, you don't add the elements you created to your windows. It must be:
Java:ServerList = new FormWindowSimple(...); ServerList.addButton(new ElementButton("text")); // add other buttons p.getPlayer().showFormWindow(ServerList);
will... I use your method but it still throw the same wrongsFirst of all, don't need to call setResponce(). Secondly, you don't add the elements you created to your windows. It must be:
Java:ServerList = new FormWindowSimple(...); ServerList.addButton(new ElementButton("text")); // add other buttons p.getPlayer().showFormWindow(ServerList);
for nullability checking use == operatorwill... I use your method but it still throw the same wrongs
use FormWindowSimple.getResponse().getClickedButtonId()But how do I tell when a window button is pressed
if I don't use responce I don't know which windows's button is pressed...
I have to compare responce and then I know which button I pressed