SourceForge.net Logo

Yes Button

Click on any component (labels, buttons, text area) to see its layout code. A complete source code overview is available as well.


    // Make sure button is below title
    cts.attachToComponent(TOP, ELASTIC, 5, title, BOTTOM);

    // Center between left border and one third of the panel's width
    cts.attachToBorder(LEFT, FIXED, 5);
    cts.attachToRelativePosition(RIGHT, FIXED, 2, 33);

    // Attach to button ok top
    cts.attachToComponent(BOTTOM, FIXED, 5, button_ok, TOP);

    panel.add(button_yes, cts);