add GSlider to GWindow (guicomponents)
in
Contributed Library Questions
•
10 months ago
Though guicomponents GWindow widget is a Processing applet I don't see how to add
ordinary widgets (GSliders, ...) to a GWindow. Is it possible ? I don't see neither how
such widgets could operate from within GWinData.
Starting from P. Lager createWindow() method from his g4p_windowsstarter example I unsuccessfully
(and naively) tried several variants of the kind :
public void createWindow(){
int col;
//GSlider sl; // ???
col = (128 << 8) | 0xff000000;
window = new GWindow(this, "Window", 130, 100, 200, 200,false, JAVA2D);
window.setBackground(col);
window.addData(new MyWinData());
window.addDrawHandler(this, "windowDraw");
window.addMouseHandler(this, "windowMouse");
// following add is not allowed, can we circumvent this issue ????
window.add(new GSlider(this,0,10,10,10,10));
}
Is there a trick to build GUIs in separate windows ? That's not mandatory but
usefull to understand what can be done with this lib.
1