1. scroll window into the viewport
3. a popup message is shown
<window id="win" border="normal" title="Window" height="300px" width="300px">
<button onClick="popup(win)" label="Popup" />
<hlayout style="overflow-x: auto">
<div style="width: 2000px" />
<window id="win2" border="normal" title="Window" height="300px" width="300px">
<button onClick="popup(win2)" label="Popup" />
<window id="win3" border="normal" title="Window" height="300px" width="300px" style="margin-left: 2000px">
<button onClick="popup(win3)" label="Popup" />
<window id="win4" border="normal" title="Window" height="300px" width="300px">
<button onClick="popup(win4)" label="Popup" />
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zk.ui.Component;
void popup(Component ref) {
String msg = "Use the force, Harry.";
String type = Clients.NOTIFICATION_TYPE_ERROR;
String pval = "bottom_center";
boolean closable = false;
Clients.showNotification(msg, type, ref, pval, dur, closable);