LECTURE 18 Java and Web Pages. Java Savvy Browser A browser capable of handling java applets: - Netscape Navigator - Microsoft Internet Explorer - Sun.

Slides:



Advertisements
Similar presentations
Computers: Tools for an Information Age Writing Your Own Web Page: Using HTML and Web Authoring Tools.
Advertisements

Working with Images and HTML
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
OMT II Mam Saima Gul. * Static web page * a web page with contents that remain fixed and unchanged once it has been created by the author Web server Client.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 4 Key Concepts 1 Copyright © Terry Felke-Morris.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
1 IMAGES: A Picture Is Worth a Thousands Words, Image Formats Choosing an Image Format Image Sizes Bits Per Pixel Graphic Tips Image Tag Attributes Line.
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.
1 IMAGES: A Picture Is Worth a Thousands Words, Image Formats Image Sizes Graphic Tips Image Tag Attributes Centering Images.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 1: Developing a Basic Web Page.
AdvWeb-1/12 DePaul University SNL 262 Web Page Design Chapt 10 - Putting Graphics on A Web Page Instructor: David A. Lash.
Marking Up With Html: A Hypertext Markup Language Primer
The tag The complete syntax of the tag is as follows( code, width and height are required and others optional)
Developing a Basic Web Page with HTML
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.
Web Design is a class created to nurture the minds of high school techies, and introduce those without prior knowledge to the field.
Chapter 3 Adding Images in HTML. Agenda Understanding Web Page Images Prepare Your Images for the Web Insert an Image Specify an Image Size Add Alternative.
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
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.
HTML HyperText Markup Language Constantly evolving - extra facilities being added regularly Java applets and JavaScript used to increase functionality.
Amber Annett David Bell October 13 th, What will happen What is this business about personal web pages? Designated location of your own web page.
1 Essential HTML coding By Fadi Safieddine (Week 2)
JAVA APPLETS By: Ms. Humaira Siddiqui. Java and the Internet Java is considered to be a language well suited to be used in the internet. In contrast with.
Agenda Links External and Internet Links Anchor Tag Text Hyperlinks Image Hyperlinks Images Image Attributes: src, alt, width, height, align, border.
CSCE Chapter 5 (Links, Images, & Multimedia) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Introduction to Computers CS Dr. Zhizhang Shen Chapter 4: Talking.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 2 HTML TAGS G H E F.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 1 1 New Perspectives on Creating Web Pages With HTML Tutorial 1: Developing a Basic Web Page.
Department of Information Technology Chapter 8 - Creating Hypertext links Lecturer: Ms Melinda Chung.
Just Enough HTML How to Create Basic HTML Documents.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
1 Web Developer Foundations: Using XHTML Chapter 4 Key Concepts.
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Chapter 4 BIE1313/BPROG1203 | Web design Prepared by Mohamed Abdulkarim / Mike Ng Ah Ngan.
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
1 CSC Computer Education (P) Ltd. DESIGNED BY K PRAKASH,
Lec.10 + (Chapter 8 & 9) GUI Java Applet Jiang (Jen) ZHENG July 6 th, 2005.
Pravin Yannawar, DOCS, NMU Jalgaon Basic Java : Applets 2 Objectives of This Session Identify the need for Applets Distinguish between Applets and Applications.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Adding Graphical Elements Essentials for.
Chapter 2 Designing Web Pages With HTML JavaMethods An Introduction to Object-Oriented Programming Maria Litvin Gary Litvin Copyright © 2003 by Maria Litvin,
Internet Applications Development Lecture 4 L. Obead Alhadreti.
HTML. Adding Background Color The bgcolor attribute lets you change the background color of the Web page. Located in the body tag See common Web Page.
Introduction to Computers 12/6/ BEGINNING HTML DESIGNING YOUR OWN WWW PAGES.
Macromedia Dreamweaver 8 Revealed AND GRAPHICS WORKING WITH TEXT.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Kevin Murphy Images and Web Pages Masters Project CS 490.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
Basic HTML Programming Technology Education Ellsworth Community Middle School Communication Systems.
Writing Your Own Web Page: Using HTML and FrontPage Chapter 10.
1 Java Applet Basics Chapter Eight. 2 Applets vs. Applications l Applications: Stand alone Java programs run by interpreter l Applets WWW browser embedded.
Slide 1 Graphics (Characteristics 1) Images have various characteristics that affect performance Size (number of pixels) – Large images can be several.
REEM ALMOTIRI Information Technology Department Majmaah University.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 4.
Marking Up with XHTML Tags describe how a web page should look
JAVA Applets Pavan D.M..
Hosted by Coach Slanina
Graphics (Characteristics 1)
Marking Up with XHTML Tags describe how a web page should look
Attribute of heading, <p> and <hr> tag
Attribute of heading, <p> and <hr> tag
Chapter 4: Marking Up With HTML: A Hypertext Markup Language Primer
Attribute of heading, <p> and <hr> tag
Presentation transcript:

LECTURE 18 Java and Web Pages

Java Savvy Browser A browser capable of handling java applets: - Netscape Navigator - Microsoft Internet Explorer - Sun Microsystem’s HotJava

HotJava The world’s first Java-savvy browser, developed by Sun Microsysttems.

Gamelan It is a reference library. It provides links to external pages maintained by the applet and script authors.

Java Applet Rating Service (JARS) JARS maintains hyperlinks to external Java-powered pages, as Gamelan does, and also ranks the applets in each page it points to.

Javazines: Electronic Magazines JavaWorld - The Java Resource Center

Support Areas JavaSoft The Java FAQ Archives

HTML Tags Mountain Twilight Iron Clouds have moved east. The mountain is a black silhouette the lake a gold and lavender bowl of twilight. -TFW

HTML Tags Check: for information regarding html tags.

HTML Tags - Hypertext Markup Language - paragraph break - line-break preformatted information

HTML Tags - Advanced Features - italic - bold - level 3 heading, range: 1 through 5 moved east - image SRC - source Hyperlinks lakes is called the anchor tag.

Introducing the Tag The tag is used to embed Java applets in Web pages. It is comprised of several parts. Format applet-parameters alternate HTML Example:

Required Applet Attributes CODE - Specifies the name of the java file HEIGHT - Specifies the height of the applet in pixels WIDTH - Specifies the width of the applet in pixels

Optional Applet Attributes ALIGN - Specifies where the applet is placed on the page in respect to the text around it: left, right, top, texttop, middle, bottom, absbottom, and baseline. ALT - This attribute specifies alternative text to be displayed if the Java-savvy browser is incapable of executing the applet for whatever reason. If you want to communicate with non-Java browsers, do so by using alternate HTML.

Optional Applet Attributes CODEBASE - This attribute specifies the base URL for the applet. The applet must be located relative to this URL. If CODEBASE isn’t specified, the applet is expected to reside in the same directory as the Web page. HSPACE - This attribute specifies the horizontal space surrounding your applet. NAME - This attribute specifies the symbolic name of the applet, allowing other applets embedded in the same page to locate your applet by name. VSPACE - This attribute specifies the vertical space surrounding your applet.

Example:

Getting to base Under normal conditions, the browser expects to find the applet file inside the same directory as the Web page. However, keeping the applet and the Web page in the same directory isn’t always possible. The optional CODEBASE tag enables you to specify a URL that points to the directory containing your applet. When a Java-savvy browser encounters the CODEBASE attribute, it automatically knows to look for the applet in the whatever directory that attribute points to.

Example In this example, browsers won’t look for the Marquee applet inside the same directory as the Web page containing this tag. Instead, browsers expect the applet to be located on the universal corporation server, inside the applets directory.

Applet Parameters The second major part of the applet tag, applet parameters, is where one can really customize an applet. Format:

Example: In this example, the name of the parameter is sndTrack. The value associated with this parameter, audio/summer.au, is a relative URL( a partial URL pointing to a file or image located relative to the Web page in which the applet itself appears) leading to a sound file. Some applets may also accept an absolute URL (complete URL provided) for this parameter:

Multiple PARMs Different applets may support any number of different parameters. It’s not unusual, for example, to come across applets that support several different parameters, giving one great flexibility when it comes to configuring them. To supply more than one parameter, all you have to do is enter the parameters one after another.

Example:

Alternate HTML Following any parameter tags that you may use, but before the closing tag, there is a special area where you can supply what’s known as alternate HTML.

Example:

NOTE The following lines are the alternate HTML:

Combining Java and HTML import java.applet.*; import java.awt.*; public class Hello extends Applet { Label helloLabel = new Label (“Hello everyone…”); public void init( ){ setBackground(Color.yellow); add(helloLabel); } }

Putting an Applet on the Page Test page for Hello Applet This line of text comes before the applet. This line of text comes after the applet.

Passing Parameters import java.applet.*; import java.awt.*; public class HelloAgain extend Applet{ Label helloLabel = new Label( ) String infoString = “null”; public void init( ) { infoString = getParameter(“info”); helloLable.setText(infoString); add(helloLabel); } }

The tag

Images GIF - Graphics Interchange Format JPEG - Joint Photographic Experts Group

GIF The GIF format is great at compressing cartoon-like artwork, but not nearly as good as JPEG for compressing photographic quality images. Interlacing is another feature unique to the GIF format. It enables images to be incrementally drawn on-screen as they come across the wire, so viewers don’t have to wait until the entire image is transmitted.

JPEG GIF images are currently limited to 256 (8-bit) colors. The JPEG format, on the other hand, supports over 16 million (24-bit) different colors. As a general rule, you should keep the total amount of material to be downloaded per page (text, graphics, sound files, applets, and so on) under 250K.

JPEG If you have a large number of graphics and more than 250K in total Web page material, consider using the JPEG format simply to gain the highest degree of compression possible. Because images with more than 100 colors tend to compress more efficiently in the JPEG format than with GIF, target those images with the most colors first for JPEG. Interlacing is not support by JPEG at the moment.