The following is a demonstration of the PopupCalcPanel which should appear in release 0.0.6 of the GWT Widget Library. Features include simple math operators, keyboard entry (currently broken in Firefox due to a GWT bug), and automatic delivery of results to a TextBox. It also ships with a default CSS file for ease of implementation.
The following code is the only code used in this example application.
TextBox calcTextBox = new TextBox();
Button showCalcBtn = new Button("Show Calc");
PopupCalcPanel calc = new PopupCalcPanel(calcTextBox, showCalcBtn);
RootPanel.get("example").add(calcTextBox);
RootPanel.get("example").add(showCalcBtn);
RootPanel.get("example").add(calc);
The PopupCalcPanel used the SimpleCalcPanel, which in turn used the CalcEngine. Bewteen these three classes it should be easy to customize the calendar to suite your needs. Current operations include addition, subtraction, multiplication, and division. Future versions will include more advanced operators such as square root and the power operator. The future enhancements will be added to the CalcEngine, allowing richer calculators to be built on top of it.