1 / 17

Developing Java Applications with NetBeans

Developing Java Applications with NetBeans. http://www.netbeans.org. Creating a new Project. Different kind of projects. The general project. Adding a new Java Class to the Project Produces this result. We can delete everything and leave just the following.

champton
Télécharger la présentation

Developing Java Applications with NetBeans

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Developing Java Applications with NetBeans http://www.netbeans.org

  2. Creating a new Project

  3. Different kind of projects

  4. The general project

  5. Adding a new Java Class to the Project Produces this result

  6. We can delete everything and leave just the following package javaapplication1; Name of the project public class Main { Name of the class (file) public static void main(String[] args) { this is to mark the beginning of the instructions of the program } This marks the end of the program } This marks the end of the class

  7. Compiling the application

  8. Running the Application

  9. The Output field

  10. Compilation Errors

  11. Changing the properties of the project

  12. Adding classes from an external jar file

  13. Selecting the file

  14. The file containing the new classes will be added during compilation and execution

  15. Telling the compiler to “import” a certain class from the jar file • At the top of the program you have to write import <package>.Console; • Package is the name of the pacakge containing the classes (in this case, JConsole) package javaapplication1; import JConsole.*; public class Main { public static void main(String[] args) { Console c = new Console(); for (int i = 1; i <= 10; i++) for (int j = 1; j <= 10; j++) c.println(i+“ * “+j+” = “+i*j); } }

  16. For more programs you just need to add classes to the project

  17. And give the name of the new class

More Related