This a simple java swing application , that generates a polygon using GUI and tells its basic information, like lengths of sides, area. You have to first run the project, a window will appear. We need to click the vertices on screen in order to make a polygon. After a polygon is made, We can click on "Get Info" to get information about length of each side, and area of polygon. Also if you try to make a invalid a polygon by intersecting and making cut from a side to another, A dialog box will appear and warn you and restrict tha action.
I. You can download the latest release of the JDK for free from http://www.oracle.com/technetwork/java/javase/downloads/index.html.
For compiling and running a Swing application using NetBeans IDE:-
-
Downloading, Installing, and Launching NetBeans IDE The easiest way to get NetBeans IDE is to download the NetBeans IDE installer for your operating system from the NetBeans download page.
-
You can then launch the IDE in one of the following ways: i) On Microsoft Windows systems, you can use the NetBeans IDE item in the Start menu. ii) On Solaris OS and Linux systems, execute the IDE launcher script by navigating to the IDE's bin directory and typing ./netbeans. iii) On Mac OS X systems, click the NetBeans IDE application icon.
-
Download the project WHen you have downloaded the project, unzip the project on your system.
-
In NetBeans IDE, choose File > Open Project. In the file chooser, select the project and click Open Project. ButtonDemoProject Once opened, the project appears in the IDE's Projects window.
-
Compiling and Running a Project To compile your whole project, right-click the project's node in the Projects window and choose Build Project. The Output window opens and displays output on the compilation progress. To run your project, right-click the project's node in the Projects window and choose Run Project..