I'm a newbie trying o create a calculator with the display only on top (p1), and the number keys 0-9 (p2) and operators x,-,+,=,/ in the row below it. I keep getting all three in a row. There must be an obvious answer, but since I'm gree, I would really appreciate your help. Thanks in advance....here's the code.
[This message has been edited by Brian Snyder (edited February 17, 2001).]
Hi Brian, By default the GridLayout will assume 1 row and n columns. If you want 3 rows then you have to tell it in the GridLayout constructor: setLayout( new GridLayout( 3,0 ) ); Then your code should work as you expect it to. Regards, Manfred.
Joined: Feb 03, 2001
Thanks for the help Manfred..... What I need is to have the display in the first row and the numbers 0 - 9 and the operator keys in 2 separate panels in the second row. Thanks!!!