how to solve this problem PlayerFormRespondedEvent

Leonidius

Member
First 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);
 

IDPreson

New Member
First 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);
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
 

IDPreson

New Member
First 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 wrongs
 

Leonidius

Member
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
use FormWindowSimple.getResponse().getClickedButtonId()
 
Top