It's been about a month since I learned Java by myself, and I want to create a GUI application using Java, so I'll try to create a calculator application. This time, we will first create the appearance of the calculator application.
▼ Website ・ Let's Programming-Let's use Swing -Programming starting with Java-Chapter 12 Let's make a calculator -Class BorderLayout
OS:Mac Language: JavaSE 1.8 Eclipse
The website that I referred to when creating the program Programming starting with Java
Lines 1-8: Import necessary libraries, etc.
Lines 18-21: Frame generation (frame title, frame size, etc.)
Lines 22-25: Generate text box
Lines 27-51: Generation of numeric keypad. Buttons such as numerical values are arranged on a 4x4 grid.
Next time, we will create processing for buttons such as number buttons.
Recommended Posts