Lec.10 + (Chapter 8 & 9) GUI Java Applet Jiang (Jen) ZHENG July 6 th, 2005.

Slides:



Advertisements
Similar presentations
Learning HTML. > Title of page This is my first homepage. Tells Browser This is an HTML page Basic Tags Tells Browser End of HTML page Header information.
Advertisements

Internet Services and Web Authoring (CSET 226) Lecture # 5 HyperText Markup Language (HTML) 1.
HTML: HyperText Markup Language Hello World Welcome to the world!
WeB application development
Website Design.
INTRODUCTION TO HYPERTEXT MARKUP LANGUAGE 1. Outline  Introduction  Markup Languages  Editing HTML  Common Tags  Headers  Text Styling  Linking.
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 1.
1 HTML Markup language – coded text is converted into formatted text by a web browser. Big chart on pg. 16—39. Tags usually come in pairs like – data Some.
HTML Programming last updated 9/12/05 at 1:30pm HyperText Markup Language Reference: – HTML BasicsHTML Basics An HTML program is a set of paired tags that.
HTML Computing Concepts HTML - An Introduction 1.
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.
Computer Science 1611 Internet & Web Creating Webpages Hypertext and the HTML Markup Language.
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.
MA10126 Introduction to HTML Gavin Shaddick
Creating a Web Page HyperText Markup Language. HTML Documents  Created using any text editor  Notepad  Vi, Pico, or Emacs  If using word-processor,
Applets, HTML and GUI’s Recitation – 04/11/2008 CS 180 Department of Computer Science, Purdue University.
Glencoe Digital Communication Tools Create a Web Page with HTML Chapter Contents Lesson 4.1Lesson 4.1 Get Started with HTML (85) Lesson 4.2Lesson 4.2 Format.
Computer Sciences Department
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
CS105 Introduction to Computer Concepts HTML
Chapter 2: The Client Side: HTML CIS 275—Web Application Development for Business I.
Basic HTML Hyper text markup Language. Re-cap  … - The tag tells the browser that this is an HTML document The html element is the outermost element.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
CS 299 – Web Programming and Design Introduction to HTML.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
1 Essential HTML coding By Fadi Safieddine (Week 2)
Understanding HTML Code
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
Applets Chapter 17.  Java’s big splash onto the scene came in the mid 90’s. The people at Sun Microsystems had managed to work java programs into Web.
HTML INTRODUCTION, EDITORS, BASIC, ELEMENTS, ATTRIBUTES.
HTML. WHAT IS HTML HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of.
1 CSC 121 Computers and Scientific Thinking David Reed Creighton University HTML and Web Pages.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
Just Enough HTML How to Create Basic HTML Documents.
HTML Hyper Text Markup Language. What is an HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup.
Introduction to HTML. Slide 1 Hard-Coding What is hard-coding? –Creating the page in a text editor just using HTML A Web designer should know how to hard-
IS1811 Multimedia Development for Internet Applications Lecture 4: Introduction to HTML Rob Gleasure
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
Introduction to HTML Wah Yan College (Hong Kong) Mr. Li C.P.
Week 1 – Beginners Content McAfee & Big Fish Games CoderDojo.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
Introduction to HTML Xiangming Mu 9/23/ Learning Objectives Understand basic HTML tags and their attributes Learn to create a simple HTML page.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
Introduction to HTML. Today’s Discussion What is HTML ? What is HTML ? What is Web Page ? What is Web Page ? Web Server Web Server Web Browser Web Browser.
IDK0040 Võrgurakendused I harjutus 01: Introduction Deniss Kumlander.
Introduction to Computers 12/6/ BEGINNING HTML DESIGNING YOUR OWN WWW PAGES.
HTML Basics Computers. What is an HTML file? *HTML is a format that tells a computer how to display a web page. The documents themselves are plain text.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
HTML Hyper Text Markup Language 1BFCET BATHINDA. Definitions Web server: a system on the internet containing one or more web site Web site: a collection.
HTML (Hyper Text Markup Language) Lecture II. Review Writing HTML files for web pages – efficient compact – fundamental. Text files with htm extension.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
What is HTML? HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
HTML-I Basic HTML Elements. HTML (Hyper Text Markup Language) HTML is a document layout and hyperlink- specification language. i.e. a language used to.
Introduction lab1. Suzanne J. Sultan 2 What is HTML? The definition of HTML is Hyper Text Markup Language. HTML is a computer language devised to allow.
HTML. INDEX Introduction to HTML Creating Web Pages Commands And Tags Web Page.
1 Introduction to HTML. 2 Definitions  W W W – World Wide Web.  HTML – HyperText Markup Language – The Language of Web Pages on the World Wide Web.
HTML And the Internet. HTML and the Internet ► HTML: HyperText Markup Language  Language in which all pages on the web are written  Not Really a Programming.
HTML for web designing short course. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension.
Introduction to HTML.
Chapter 8 Introduction to HTML and Applets
HTML Basics.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Lecture 16: Applets & HTML
3.00cs HTML Overview 3.00cs Develop webpages.
Presentation transcript:

Lec.10 + (Chapter 8 & 9) GUI Java Applet Jiang (Jen) ZHENG July 6 th, 2005

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 2 Outline Intro. to HTML Intro. To URL HTML Links Java Applet Tags Parsing Parameters to Java Applet init( ) method appletviewer command

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 3 Intro. To HTML HTML stands for Hyper Text Markup Language An HTML file is a text file containing small markup tags The markup tags tell the Web browser how to display the page An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 4 Intro. To HTML A example of HTML file Title of page This is my first homepage. This text is bold

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 5 Intro. To HTML Example Explained The first tag in your HTML document is. This tag tells your browser that this is the start of an HTML document. The last tag in your document is. This tag tells your browser that this is the end of the HTML document. The text between the tag and the tag is header information. Header information is not displayed in the browser window. The text between the tags is the title of your document. The title is displayed in your browser's caption. The text between the tags is the text that will be displayed in your browser. The text between the and tags will be displayed in a bold font. HTML tags are not case sensitive. But XHTML (the next generation HTML) demands lowercase tags.

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 6 Tag Attributes Tags can have attributes. Attributes can provide additional information about the HTML elements on your page. Ex1: This tag defines the body element of your HTML page:. With an added bgcolor attribute, you can tell the browser that the background color of your page should be red, like this:. Ex2: This tag defines an HTML table:. With an added border attribute, you can tell the browser that the table should have no borders: Attributes always come in name/value pairs like this: name="value". Attribute values should always be enclosed in quotes, either single quote or double quote. Attributes are always added to the start tag of an HTML element.

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 7 HTML Tags Headings: Defined with the to tags. defines the largest heading. defines the smallest heading. Paragraphs: Defined with the tag. HTML automatically adds an extra blank line before and after a paragraph. Line Breaks: Defined with the tag. The tag is an empty tag. It has no closing tag. Comments in HTML: …

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 8 Uniform Resource Locator (URL) Some examples of the most common schemes can be found below: SchemeAccess fileA file on your local PC ftpA file on an FTP server httpA file on a World Wide Web Server telnetA Telnet connection

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture 10 9 HTML Links To make a hypertext link: Surround the text you want to be linked with tags. Inside the tag place an HREF attribute whose value is the URL you want to link to. Ex1: lab5 Ex2: Last Page Link to your Mail system:

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture Absolute URL & Relative URL Absolute URL: a completely specified URL Relative URL: If any piece of the URL is missing, it is assumed to be the same as that of the document in which the URL is found. Such a URL is called a relative URL Ex: click on this hyperlink the FAQ The browser cuts books.html off the end Get Then it attaches javafaq.html onto the end to get

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture Absolute URL & Relative URL If the relative link begins with a /, then it is relative to the document root instead of relative to the current file. Ex: while browsing clicked on this hyperlink: Your browser would throw away /javafaq/javafaq.html and attach /boutell/faq/www_faq.html to the end of to get Relative URLs have a number of advantages. First they save a little typing. More importantly relative URLs allow entire trees of HTML documents to be moved or copied from one site to another without breaking all the internal links.

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture The Applet Element Applet Tags and Applet Attributes code: where to look for the compiled.class file codebase: contains a URL that points at the directory where the.class file is Width, height: how big a rectangle the browser should set aside for the applet

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture Parsing Parameters to Applet Parameters are passed to applets in NAME=VALUE pairs in and tags Using the getParameter() method to read parameter values

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture Example Java File: import java.applet.*; import java.awt.*; public class DrawStringApplet extends Applet { private String defaultMessage = "Hello!"; public void paint(Graphics g) { String inputFromPage = this.getParameter("Message"); if (inputFromPage == null) inputFromPage = defaultMessage; g.drawString(inputFromPage, 50, 25); }

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture Example HTML File: Draw String This is the applet: This page will be very boring if your browser doesn't understand Java.

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture The init( ) method init( ) in Java Applet is like the main( ) in Java Application. It is called exactly once in an applet's life, when the applet is first loaded. To read PARAM tags, start downloading any other images or media files you need, and set up the user interface.

CS401/COE401 Summer 2005.Department of Computer Science.University of Pittsburgh.Lecture The appletviewer command To run a Java Applet, using appletviewer command Ex: appletviewer MiniCalcApplet.htm Let us study the MiniCalcApplet example from the textbook, compare this applet with the MiniCalc application...