Since my menu will have a variable number of options, I need to programmatically position them. However, I don’t get it to work.
buttons.add(new ButtonBuilder("button_" + name, name) {
{
height("15%");
width("15%");
backgroundColor(Color.randomColor());
//alignCenter(); // works but I need more than three options
// align(Align.valueOf("10px")); // IllegalArgumentException
// x("10px"); // does nothing
// set("x", "10px"); // does nothing
}
});
How can I position it programmatically at (x, y)?