mutex PopupPanel problem

0 views
Skip to first unread message

jack.tang

unread,
May 22, 2006, 11:22:18 PM5/22/06
to Google Web Toolkit
Two popup panel PA and PB that are trigger by two buttons A and B
separately. I want PA and PB are mutex, which means only one popup
panel is show in the screen.

My code is here:

final Button paBtn = new Button("PA");
final Button pbBtn= new Button("PB");

final PopupPanel pa = new PopupPanel(false);
final PopupPanel pb = new PopupPanel(false);

paBtn.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
pb.hide();
pa.setPopupPosition(100, 200);
pa.show();
}
});


pbBtn.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
pa.hide();
pb.setPopupPosition(300, 400);
pb.show();
}
});

But the result is not what I expected, so could you give me some hits?
what's wrong?

Reply all
Reply to author
Forward
0 new messages