From c89adea3f89ef951c84848f278d0181b3f540bd2 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 28 Feb 2008 12:38:25 +0000 Subject: [PATCH] fixes #1408 svn changeset:3941/svn branch:trunk --- src/com/itmill/toolkit/demo/Calc.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/itmill/toolkit/demo/Calc.java b/src/com/itmill/toolkit/demo/Calc.java index e3655239f2..561b8fd780 100644 --- a/src/com/itmill/toolkit/demo/Calc.java +++ b/src/com/itmill/toolkit/demo/Calc.java @@ -63,6 +63,12 @@ public class Calc extends com.itmill.toolkit.Application implements // Create a new layout for the components used by the calculator final GridLayout layout = new GridLayout(4, 5); + // Styling: fix grids size, cells will become equally sized + layout.setWidth("15em"); + layout.setHeight("18em"); + // Styling: leave margin around layout + layout.setMargin(true); + // Create a new label component for displaying the result display = new Label(Double.toString(current)); display.setCaption("Result"); @@ -73,6 +79,7 @@ public class Calc extends com.itmill.toolkit.Application implements // Create the buttons and place them in the grid for (int i = 0; i < captions.length; i++) { final Button button = new Button(captions[i], this); + button.setSizeFull(); // use all size given by grid layout.addComponent(button); } -- 2.39.5