Warning: session_start(): open(/var/lib/php/sessions/sess_v5i99evvhcgcbqa33fcsjikgev, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// x = names and components interleaving.
// or just components.
// or just names.
// also, first element can be index of tab to open at start
// also, SUPER short demo syntax: jtabs(3)
// also, you can pass a Collection containing the elements
static JTabbedPane fillJTabs(final JTabbedPane tabs, fO... _x) {
if (tabs != null) swing {
clearTabs(tabs);
O[] x = flattenArray2(_x);
int idx = 0;
if (get(x, 0) instanceof Int) {
idx = asInt(get(x, 0));
x = dropFirst(x);
if (empty(x)) {
x = arrayrep(null, idx);
idx = 0;
}
}
int n = 0;
for (int i = 0; i < l(x); i++) {
++n;
if (x[i] instanceof Component)
tabs.addTab("Tab " + n, wrap((Component) x[i]));
else {
S name = str(or(x[i], "Tab " + n));
Component c;
if (get(x, i+1) instanceof Component)
c = (Component) get(x, ++i);
else
c = new JPanel;
tabs.addTab(name, wrap(c));
}
}
if (idx != 0)
tabs.setSelectedIndex(min(tabs.getTabCount()-1, idx));
}
ret tabs;
}