showing your applet
play

Showing your applet on a webpage 1 11/22/2013 Steps Find the - PDF document

11/22/2013 CSCI-1101B Lab Java Topics Applet on webpage Interface GUI Mohammad T . Irfan 11/22/13 Showing your applet on a webpage 1 11/22/2013 Steps Find the build folder inside your project folder You will see An html


  1. 11/22/2013 CSCI-1101B Lab Java Topics Applet on webpage Interface GUI Mohammad T . Irfan 11/22/13 Showing your applet on a webpage 1

  2. 11/22/2013 Steps  Find the build folder inside your project folder  You will see  An html file  A folder named classes  Copy objectdraw.jar file into the classes folder  Edit the html:  <APPLET codebase="classes" code="roachmasterv5/RoachMasterV5.class" archive="objectdraw.jar" width=800 height=600></APPLET> My html file 2

  3. 11/22/2013 After opening it in web browser Running your application without Netbeans 3

  4. 11/22/2013 Steps  LinkedList project example  In Nebeans , go to Run menu and click “clean and build”  This creates a dist folder inside your project folder  You will see a .jar file there, which is executable  My file name: LinkedList.jar  Execute the .jar file from terminal  Go to the right directory using cd  Command: java – jar LinkedList.jar  You have to use the your .jar file name Interface Chapter 10 Java Textbook (on Blackboard) 4

  5. 11/22/2013 Interface  Specifies the skeleton of a class  defines the method headers of public methods  No variables  No constructor methods – no object of interface  To create an object  Need to write a class that implements the interface  Implement each method of the interface  May have additional methods LinkedListInterface 5

  6. 11/22/2013 LinkedList class LinkedList class  Many other additional methods not present in the interface... 6

  7. 11/22/2013 Graphical User Interfaces (GUI) Chapter 11 Java Textbook (on Blackboard) Java Swing  GUI  Buttons, text fields, text areas, labels, radio buttons, check boxes, etc.  All can be done using Netbean’s visual design interface  Create a project (omit main file)  Try to add a new java file the usual way, but from New, select Other instead of Java class  Select Swing GUI Form on the left  On the right, select JFrame Form  Follow the demo 7

  8. 11/22/2013 In-class exercise  Add two numbers  https://netbeans.org/kb/docs/java/gui- functionality.html 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend