Quantcast
Channel: JetBrains Developer Community : All Content - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5481

How to draw a GUI that looks like a basic calculator

$
0
0

Hi,

 

I am sorry for such a basic question. I would like to create a GUI Calculator which does 4 operations. A vary basic stuff just to play around with GUI components.

 

But I have hard time to control the size, position, spacing of the component. Also when the whole thing is displayed, the size of the frame is totally different than the one I designed in the GUI. At runtime, the frame crops to surround all the components leaving zero margin. The buttons seems to be resized base on I don't know what rule. Granted I am new to GUI Java programming but I believe drawing a calculator GUI should not be that difficult.

 

Can you please show me the basic steps to draw a decent calculator?

 

Thanks very much in advance.


Viewing all articles
Browse latest Browse all 5481

Trending Articles