CS100J 03 May 2005 Applications and Applets (Chapter 16 of the text)

Slides:



Advertisements
Similar presentations
HTML. The World Wide Web Protocols Addresses HTML.
Advertisements

A guide to HTML. Slide 1 HTML: Hypertext Markup Language Pull down View, then Source, to see the HTML code. Slide 1.
Chapter 16 The World Wide Web.
Lecture 15.1 Static Methods and Variables. © 2006 Pearson Addison-Wesley. All rights reserved Static Methods In Java it is possible to declare.
Java Applets A lab course by Dr. Junaid Ahmed Zubairi SUNY Fredonia.
1 CS100J 12 April 2007 Applications and Applets Read Chapter 16 of the text I never let my schooling interfere with my education. Mark Twain Learning makes.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Java Applets What is an Applet? How do you create.
1 Applets Chapter 1 To understand:  why applets are used to extend the capabilities of Web pages  how an applet is executed and know about the restrictions.
Chapter 14 Applets. 2 Knowledge Goals Understand the differing roles of applications and applets Understand how a browser operates Understand the role.
1 Recitation 11. Applet Applets. An applet is a Java program that is started by a browser (e.g. netscape or internet explorer) when an html file has a.
23-Jun-15 HTML. 2 Web pages are HTML HTML stands for HyperText Markup Language Web pages are plain text files, written in HTML Browsers display web pages.
CS100Lecture 181 Announcements P4 due tomorrow P5 handed out today References? Leave me a picture and a short note.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
Chapter 131 Applets and HTML Chapter Reminders Project 8 due Dec 10:30 pm Project 6 regrades due by midnight tonight –Submit all files (including.
Program Design With Methods And Graphics / Chapter 4 1 Abstract Window Toolkit.
Applets, HTML and GUI’s Recitation – 04/11/2008 CS 180 Department of Computer Science, Purdue University.
Developing User Interfaces (DUI) Chris North cs3724: HCI.
Introduction to Java Programming CS 21a: Introduction to Computing I First Semester,
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Java Applets What is an Applet? How do you create.
1 Essential HTML coding By Fadi Safieddine (Week 2)
HTML INTRODUCTION. What is HTML?  HTML stands for Hypertext Markup Language  Developed in 1990  Hidden code that helps us communicate with others on.
Computer Information Technology – Section 3-4. HTML – The Language of the Internet Objectives: The Student will: 1. Look at HTML 2. Understand the basic.
1 CS100J 2 December 2008 Applications and Applets Read Chapter 16 of the text We also look at html, since we need it to use applets. Top finalists from.
CPSC 203 Introduction to Computers Lab 33 By Jie Gao.
Lec.10 + (Chapter 8 & 9) GUI Java Applet Jiang (Jen) ZHENG July 6 th, 2005.
1 Recitation 09. Applications and Applets Java applications Those who took CS100J and CS100M in fall 2003 may not have had much experience with Java applications.
1 CS Nov 2011 Applications and Applets Read Chapter 16 of the text We also look at html, since we need it to use applets. Top finalists from a real-life.
CS/ENGRD 2110 SPRING 2012 Lecture 2: Objects and classes in Java 1.
Chapter 6 Applets and HTML  Overview  HTML tags for Applets  Applet Life Cycle  Applet Class  JAR files.
CPSC 203 Introduction to Computers Lab 66 By Jie Gao.
Lecture 15.1 Static Methods and Variables Static Methods In Java it is possible to declare methods and variables to belong to a class rather than.
12-2 Chapter Topics Chapter 14 discusses the following main topics: Introduction to Applets A Brief Introduction to HTML Creating Applets with Swing Using.
CS 111 – Oct. 4 Web design –HTML –Javascript Commitment: –This week, read sections 4.3 – 4.5.
Chapter 4 Applets Cop Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your.
Introduction to Computers 12/6/ BEGINNING HTML DESIGNING YOUR OWN WWW PAGES.
25/2/00SEM107 - © Kamin & ReddyClass 9 - HTML - 1 Class 9 - HTML r Creating a personal web page r Structure of HTML documents r HTML tags r The APPLET.
1 CS November Testing/Debugging. And Applications Read chapter 14, pp. 385–401 Prelim 2 Max 100 Median 82 Mean 78.3 Min * ***************************
1 Applications & Applets Standalone applications & Java applets Peter Mozelius DSV/UCSC.
Chapter 131 Applets and HTML Chapter Objectives learn how to write applets learn to write a simple HTML document learn how to embed an applet in.
Applets, Images, and Audio Chapter 14 CSCI CSCI 1302 – Applets, Images, and Audio2 Outline Introduction The Applet Class –The init Method –The start.
Introduction to Programming. The Programming Process Create/Edit Program Compile Program Execute Program Compile Errors?Run-Time Errors? Source Program.
Web programming Part 1: HTML 由 NordriDesign 提供
CSC 243 – Java Programming, Spring, 2014 April 22, 2014 Week 13, JApplets.
CS/ENGRD 2110 SPRING 2016 Lecture 2: Objects and classes in Java 1.
+ HTML Hypertext Markup Language. + Introducing HTML HTML is the language used in writing websites Open the “HTML Practice” link on the Daily Log Delete.
1 CS100J 08 November 2005: Applications and Applets Java application; How to produce a stand-alone application, to be run without using DrJava or any such.
1 2/16/05CS120 The Information Era Chapter 4 Basic Web Page Construction TOPICS: Intro to HTML and Basic Web Page Design.
HTML: Hypertext Markup Language The language to make web pages 0.
Getting Started – Basic Page Structure
CS/ENGRD 2110 Fall 2017 Lecture 2: Objects and classes in Java
Introduction to HTML.
We also look at html, since we need it to use applets.
Uppingham Community College
WEB PAGES: CREATING AND MAINTAINING **
We also look at html, since we need it to use applets.
Creating a webpage html coding
30 Java Applets.
Graphical user interface-based programming
Chapter 27 WWW and HTTP.
HTML HYPERTEXT MARKUP LANGUAGE.
Applets.
Introduction to Computing Using Java
Java Applets.
CS November 2010 Ragged arrays, Applets
Chapter 16 The World Wide Web.
CS100J CS100M is in Kimball Bll.
We also look at html, since we need it to use applets.
Outline Character Strings Variables and Assignment
Hypertext Markup Language
For the CIS17 course..
Presentation transcript:

CS100J 03 May 2005 Applications and Applets (Chapter 16 of the text) Please take the time to complete the online course evaluation for all your Engineering Courses. For this course, completion of the evaluation is required and carries a weight of 1. We have finished what you need to know for Matlab. You should be able to do most of the assignment in lab today and tomorrow. I never let my schooling interfere with my education. Mark Twain Learning makes a man fit company for himself. Anon The primary purpose of a liberal education is to make one's mind a pleasant place in which to spend one's time. Sydney J. Harris (1917-1986) American journalist.

FINAL: Dec 13, noon, Barton Hall East Thursday, we will give you (and put on the website) A list of things you should know for the final. The list will include a detailed discussion of what you need to know for Matlab The final from a previous CS 100J The answers to a previous CS100J Other questions, with answers We will schedule review sessions --keep an eye on the website for information on them.

Every Java program is either an application or an applet. We are discussing executing Java programs outside of the DrJava Interactions pane. public class C { … public static void main(String[] args) { } Every Java application needs a class with a method main that is defined like this The parameter, an array of Strings, can be used to pass information into the program.

(can type “java C” in DrJava Interactions pane) public class C { … public static void main(String[] args) { } > cd > dir (list of files) > java C Causes call C.main(null); to be executed Terminal window (can type “java C” in DrJava Interactions pane)

jar file (Java Archive file) (after tar file (Tape Archive file)) Contains (among other things) .class files a “manifest”, which says which class has method main Manifest: A list of passengers or an invoice of cargo for a vehicle (as a ship or plane).

Suppose images.jar contains a Java application (it has a class with a static procedure main, and its manifest names the class) • Execute it by double clicking its icon in a directory. • Execute it by typing java -jar images.jar in a terminal window (or DOS, or command-line window)

expands to name all the .class files Creating jar file Navigate to the directory that contains the .class files. Create a text file x.mf that contains one line (with a line-feed): Main-class: <name of class> In the directory, type: jar -cmf x.mf app.jar *.class Create Manifest File name of manifest file name of manifest file expands to name all the .class files

Inspecting jar files name of jar file jar -tf images.jar List the contents of jar file images.jar type (list) File name of jar file

Four inherited procedures: called to initialize Applet: a java program that can be called from a web page (in your browser) public class C { public static void main(String[] args) { … } } application Four inherited procedures: called to initialize called to start processing called to stop processing called to destroy resources (just before killing the applet) import javax.swing.*; public class A extends JApplet{ public void init() { … } public void start() { …} public void stop() { … } public void destroy() { … } } applet

An html (HyperText Markup Language) file <head> <title>FacultyApplet</title> </head> <body> <p align="center"><B>This</B> is an <i>Applet!</i> </p> <br><br> <p><applet archive="AppletClasses.jar” code="FacultyApplet.class” width=800 height=550> </applet> </body> </html> tags <html> start an html page <head> start the “heading” <title> the title for the page <body> start the body, content, of the page <p> begin a paragraph <b> begin boldface <i> begin italics <applet> start a Java applet <br> line break (no end tag)

Programming languages Dates approximate Year Major languages Teach at Cornell 1956’s Fortran 1960 Algol, LISP, COBOL PL/I PL/C (1969) 1970 C Pascal 1980’s Smalltalk (object-oriented) Pascal (1980’s) 1980’s (late) C++ Java C 1998 Java