Fachbereich Informatik und Elektrotechnik Java Applets. Programming in Java. Java Applets. Programming in Java, Helmut Dispert

Size: px
Start display at page:

Download "Fachbereich Informatik und Elektrotechnik Java Applets. Programming in Java. Java Applets. Programming in Java, Helmut Dispert"

Transcription

1 Java Applets Programming in Java Java Applets

2 Java Applets applet= app = application snippet = Anwendungsschnipsel An applet is a small program that is intended not to be run on its own, but rather to be embedded inside another application. Ref.: Sun Microsystems

3 CGI - Common Gateway Interface Internet Applications HTML Browser CGI Application Program Operating System Client Application WebServer

4 Java Applications and Applets Internet Java Applications Java Applet HTML Browser Application Server CGI Application Program Operating System Client Application WebServer

5 Java Applications and Applets Applet: Java application that runs within a WWW-browser. Java AWT: Abstract Windowing Toolkit Advantages: Defined surface exists (window, graphic environment, event handling) Disadvantages (security): no file access;no communication with other computers; programs cannot be executed;native code cannot be loaded.

6 AWT vs. Swing APIs Java AWT (Abstract Windowing Toolkit) Package: java.awt GUI functionality (graphical user interface) Component libraries: labels, buttons, textfields, etc. (platform dependent) Helper classes: event handling, layout managers (window layouts), etc. The Swing APIs Package: javax.swing Greater platform independence - portable "look and feel" (buttons, etc.) AWT and Swing are part of the JFC (Java Foundation Classes) Easy upgrading using "J": Applet JApplet Button JButton

7 Viewing Applets Viewing Applets: a. using a (Java enabled) Browser: load HTML-file (*.html) that will call the applet-file (*.class) from local directory. b. Using the appletviewer (part of the java development kit): appletviewer name.html batch file: appletviewer %1.html

8 Classes, Packages Classes for Applet Programming java.awt.graphics java.awt.image java.awt.font java.awt.color java.awt.event java.net.url Importing Packages / Subpackages import java.awt.color; import java.awt.*; import java.awt.graphics; import java.awt.font;

9 Classes, Packages java.lang.object java.awt.component java.awt.container java.awt.panel java.applet.applet Component Container Panel Applet

10 Class JApplet java.lang.object java.awt.component java.awt.container java.awt.panel java.applet.applet javax.swing.japplet Class JApplet: An extended version of java.applet.applet that adds support for the JFC/Swing component architecture. Component Container Panel Applet JApplet

11 Classes, Packages Syntax: public class Name extends java.applet.applet {... } imported package class

12 Methods Java Applets Methods that are automatically called (implicit call) void init() void start() void paint(graphics g) void repaint() void stop() void destroy() Initialization: Set up colors, fonts, etc. when first loaded start the applet when loading HTML page (e.g. start animation) paint screen: display text, graphics repaint screen: call paint() for update stop the applet cleanup (before exiting)

13 Hello World Applet Example Source Program "Hello World" import java.awt.graphics; public class HelloWorldApp extends java.applet.applet { } public void paint (Graphics g) { g.drawstring("hello World!", 40, 20); } stored in: HelloWorldApp.java compiled with: javac HelloWorldApp.java

14 AWT The java.awt.graphics class Coordinate System: origin x y Unit: pixel

15 Hello World Applet Example Source Program "Hello World" <HTML> <HEAD> <TITLE>Hallo World Applet</TITLE> </HEAD> <BODY> <APPLET CODE= "HelloWorldApp.class" WIDTH = "210" HEIGHT = "50"> </APPLET> </BODY> </HTML>

16 Hello World Applet Object Tag: To address these issues, HTML 4 introduces the OBJECTelement, which offers an all-purpose solution to generic object inclusion. The new OBJECTelement thus subsumes some of the tasks carried out by existing elements: Type of inclusion Image Applet Another HTML document Specific element IMG APPLET(deprecated) IFRAME Generic element OBJECT OBJECT OBJECT The chart indicates that each type of inclusion has a specific and a general solution. The generic OBJECTelement will serve as the solution for implementing future media types. <object codetype="application/java" classid="java:applet.class" width="200" height="250"> </object>

17 Hello World Applet Example import java.awt.graphics; import java.awt.font; import java.awt.color; public class HelloWorldApp2 extends java.applet.applet { String str = "Hello World 2"; int w = 300; int h = 80; Font f = new Font ("Arial", Font.BOLD + Font.ITALIC, 48); public void init() { resize(w,h); } } public void paint (Graphics g) { g.setfont(f); g.drawrect(0,0,w-1,h-1); g.setcolor(color.red); g.drawstring(str, 10, 50); } continued

18 Hello World Applet Example <HTML> <HEAD> <TITLE>Hallo World Applet</TITLE> </HEAD> <BODY> <APPLET CODE= "HelloWorldApp2.class" WIDTH = "350" HEIGHT = "100"> </APPLET> </BODY> </HTML> Object

19 Hello World Applet Example using Swing import javax.swing.*; import java.awt.*; public class JHWApplet extends JApplet { String msg; } public void init() { msg = "Hello J-World"; } public void paint(graphics g) { g.drawstring(msg, 20, 30); }

20 Methods Further Methods boolean isactive() String getappletinfo() void showstatus(string msg) public String getparameter(string name) URL getcodebase() Image getimage(url url) AudioClip getaudioclip(url url) void play(url url) Determines if this applet is active. Returns information about this applet. Requests that the argument string be displayed in the "status window (bar)". Returns the value of the named parameter in the HTML tag. Gets the base URL. Returns an Image object that can then be painted on the screen. Returns the AudioClip object specified by the URL argument. Plays the audio clip at the specified absolute URL. Ref.: Sun Microsystems

21 Hello World Applet using Parameters Transfering Parameters from HTML to Applet <APPLET CODE = filename or URL> <PARAM NAME = "name" VALUE = "value">... </APPLET> Check for Null Reference:... if (name == null)...

22 Applet using Parameters import java.awt.graphics; import java.awt.font; import java.awt.color; public class HelloWorldApp3 extends java.applet.applet { String text, fontsize; Font f; int w = 300; int h = 80; int thefontsize; public void init() { resize(w,h); this.text = getparameter("text"); if(this.text == null) this.text = "Hello World - Error!"; this.fontsize = getparameter("fontsize"); if (this.fontsize == null) this.thefontsize = 18; else this.thefontsize = Integer.parseInt(fontSize); } continued

23 Applet using Parameters } public void paint (Graphics g) { Font f = new Font("Arial", Font.BOLD + Font.ITALIC, this.thefontsize); g.setfont(f); g.drawrect(0,0,w-1,h-1); g.setcolor(color.red); g.drawstring(text, 10, 50); } continued

24 Applet using Parameters <HTML> <HEAD><TITLE>Hallo World Applet</TITLE></HEAD> <BODY> <APPLET CODE="HelloWorldApp3.class" WIDTH="600" HEIGHT="100"> <PARAM NAME="text" VALUE="Hello World, Version 3"> <PARAM NAME="fontSize" VALUE="48"> </APPLET> </BODY> </HTML> With parameters Without parameters continued

25 Applet using Parameters with Parameter without Parameter

26 AWT Documentation Method drawline(int,int,int,int) drawrect(int,int,int,int) fillrect(int,int,int,int) drawroundrect(6*int) draw3drect(4*int, boolean) drawpolygon(int[],int[],int) drawoval(int,int,int,int) drawarc(6*int) fillarc(6*int) clearrect(int,int,int,int) copyarea(6*int) Description x/y-start to x/y-end x/y-upper left to lower right filled rectangle last 2 int for rounding 3D Rect. with shadow (y/n) x,y-coordinates, number Oval (including circle) Arc filled Arc rect. in background color x/y-translation

27 AWT - Example: Curve Plotting import java.awt.*; public class CurveApp extends java.applet.applet { int f(double x) { return (int) ((Math.cos(x/5) + Math.sin(x/7) + 2) * 50); } } public void paint (Graphics g) { for (int x = 0; x < 400; x++) g.drawline(x,f(x),x+1,f(x+1)); } continued

28 AWT - Example: Curve Plotting <HTML> <HEAD> <TITLE>Hallo World Applet</TITLE> </HEAD> <BODY> <APPLET CODE= "CurveApp.class" WIDTH="600" HEIGHT = "200"> </APPLET> </BODY> </HTML>

29 Color Class: java.awt.color Standard colors are class variables RGB-Color: RED, GREEN, BLUE (16.7 million colors) Create New Colors: (Integer) Color name= new Color (int red, int green, int blue) (Float) Color name= new Color(float red, floatgreen, float blue)

30 Color The class Color provides a series of static Color-objects that can be used directly: public static Color white public static Color lightgray public static Color gray public static Color darkgray public static Color black public static Color red public static Color blue public static Color green public static Color yellow public static Color magenta public static Color cyan public static Color orange public static Color pink Methods to determine the RGB-values of a color-object: public int getred() public int getgreen() public int getblue()

31 Color Methods Methods setcolor(color) setbackground (Color) setforeground (Color) Description Set the current color Set the background color Set the foreground color setcolor (new Color(1.0f, 0.0f, 0.0f)); Color c = new Color (0,255,0); setbackground (c); // RGB green setbackground(color.green); // Standard color green

32 Graphics g (lamp demo) import java.awt.*; public class Lamp extends java.applet.applet { public void init() { resize(300,300); } public void paint(graphics g) { // the moon g.drawarc (20,20,100,100,90,180); g.drawarc (40,20,60,100,90,180); // the table g.setcolor (Color.orange); g.filloval (0,220,300,100); g.setcolor (Color.black); continued

33 Graphics g (lamp demo) } // lamp cable g.drawrect (148,0,5,89); // upper arc of lamp g.drawarc (85,87,130,50,62,58); // two lines of the lamp g.drawline (215,177,181,90); g.drawline (85,177,119,90); // the lower oval g.setcolor (Color.yellow); g.filloval (85,157,130,50); // lamp pattern g.setcolor (Color.red); g.filloval (120,100,20,20); g.copyarea (120,100,20,20,40,-7); g.copyarea (120,100,20,20,30,30); g.copyarea (120,100,20,20,-15,35); g.copyarea (120,100,20,20,60,40); }

34 System Colors public final class SystemColor: A class to encapsulate symbolic colors representing the color ofnative GUI objectson a system. For systems which support the dynamic update of the system colors (when the user changes the colors) the actual RGB values of these symbolic colors will also change dynamically. In order to compare the "current" RGB value of a SystemColor object with a non-symbolic Color object, getrgb should be used rather than equals. Examples: SystemColor.desktop SystemColor.window SystemColor.control SystemColor.controlText SystemColor.scrollbar The color rendered for the background of the desktop. The color rendered for the background of interior regions inside windows. The color rendered for the background of control panels and control objects, such as pushbuttons. The color rendered for the text of control panels and control objects, such as pushbuttons. The color rendered for the background of scrollbars.

35 AWT Structure Types of classes and interfaces in package AWT Graphics Components (Windows, Menus) Layout Manager Event Handler Image Manipulation

36 AWT Structure java.awt.component partial listings Component Container Button Canvas Checkbox Label Window Panel ScrollPane java.awt Graphics Color Font Font Image FontMetrics CLASS extends ABSTRACT CLASS implements INTERFACE

37 Fonts Class: java.awt.font Font types: Courier; TimesRoman; Helvetica, Arial, etc. Font Styles: Font.PLAIN // = 0 Font.BOLD // = 1 Font.ITALIC // = 2 Size: in pixel

38 Fonts Font styles are constants that can be added: Example: Font.BOLD + Font.ITALIC // bold italic Creating Fonts, Examples: Font f = new Font("TimesRoman", Font.BOLD, 48) Method f.* getname() getsize() getstyle() isplain() isbold() isitalic() Description Return name of font as string Return current font size (int) Return current styles (0-3) Returns true if plain Returns true if bold Returns true if italic

39 Fonts Examples: Font f = new Font("TimesRoman", Font.PLAIN, 72); g.setfont(f); g.drawstring("this is size 72",10,100); Method g.* drawstring() setcolor() setfont() getfont() Description Draw a string Set color to be used Set font to be used Return current font object

40 FontMetrics FontMetrics (abstract class) Quality of text and font Method fm.* stringwidth(str) charwidth(c) getascent() getdescent() getleading() getheight() Description Return width of string str Width of char c Return the ascent of the font Return the descent of the font Returns the leading of the font Returns the total height of font 2D Text Tutorial

41 FontMetrics import java.awt.*; public class Center extends java.applet.applet { public void paint (Graphics g) { Font f = new Font ("TimesRoman", Font.PLAIN, 24); FontMetrics fm; g.setfont(f); fm = getfontmetrics(f); String str = "This text will be centered"; int x = (this.size().width - fm.stringwidth(str)) / 2; int y = (this.size().height - fm.getheight()) / 2; } } g.drawstring(str,x,y);

42 FontMetrics Demo import java.awt.*; import java.applet.*; public class DrawText extends Applet { public void paint (Graphics g) { // output strings byte byte_text[] = {'H','E','L','L','O'}; char char_text[] = {'h','e','l','l','o'}; String String_text = "\u00c4g"; // fonts Font Arial24 = new Font ("Arial", Font.PLAIN,24); Font Tmsrm72 = new Font ("TimesRoman", Font.PLAIN,72); // font metrics FontMetrics fm; int ascent, descent; int string_width; int char_width; int leading; continued

43 FontMetrics Demo // simple output methods g.drawbytes (byte_text,0,5,20,20); g.drawchars (char_text,0,5,20,40); g.drawstring ("A complete string",20,60); g.drawstring (Arial24.toString(),20,80); // selecting a font g.setfont (Arial24); g.drawstring ("Now using Arial 24",20,120); // translate origin g.translate (100,250); // select a large font g.setfont(tmsrm72); continued

44 FontMetrics Demo // font metrics fm = getfontmetrics (Tmsrm72); string_width = fm.stringwidth (String_text); char_width = fm.charwidth ('\u00c4'); ascent = fm.getascent (); descent = fm.getdescent (); leading = fm.getleading (); // draw vertical lines g.drawline (0, - ascent -10, 0, descent + 10); g.drawline (char_width, -ascent, char_width, descent + 10); g.drawline (string_width, - ascent -10, string_width, descent +10); } // draw horzontal lines g.drawline (-10, 0, string_width + 10, 0); g.drawline (-10, -ascent, string_width +10, -ascent); g.drawline (-10, descent, string_width + 10, descent); g.drawline (-10, descent + leading, string_width + 10, descent + leading); } continued

45 FontMetrics Demo

46 Applet Demo Karnaugh-Veitch Diagramm

47 Model-View-Controller MVC: Model-View-Controller-Architecture: Methodology / design pattern widely used in objectoriented programming. Relates the the user interface (UI) to the underlying data models. Used in program development with Java, Smalltalk, C, and C++.

48 Model-View-Controller The MVC pattern proposes three main components or objects to be used in software development: A Model: represents the underlying, logical structure of data in a software application and the high-level class associated with it. Does not contain information about the user interface. A View: collection of classes representing the elements in the user interface (visual display, possible user responses -buttons, display boxes, etc.) A Controller: represents the classes connecting the model and the view.

49 Model-View-Controller View Model Controller

Java applets. SwIG Jing He

Java applets. SwIG Jing He Java applets SwIG Jing He Outline What is Java? Java Applications Java Applets Java Applets Securities Summary What is Java? Java was conceived by James Gosling at Sun Microsystems Inc. in 1991 Java is

More information

SE 450 Object-Oriented Software Development. Requirements. Topics. Textbooks. Prerequisite: CSC 416

SE 450 Object-Oriented Software Development. Requirements. Topics. Textbooks. Prerequisite: CSC 416 SE 450 Object-Oriented Software Development Instructor: Dr. Xiaoping Jia Office: CST 843 Tel: (312) 362-6251 Fax: (312) 362-6116 E-mail: [email protected] URL: http://se.cs.depaul.edu/se450/se450.html

More information

Introduction to Java Applets (Deitel chapter 3)

Introduction to Java Applets (Deitel chapter 3) Introduction to Java Applets (Deitel chapter 3) 1 2 Plan Introduction Sample Applets from the Java 2 Software Development Kit Simple Java Applet: Drawing a String Drawing Strings and Lines Adding Floating-Point

More information

How To Program In Java (Ipt) With A Bean And An Animated Object In A Powerpoint (For A Powerbook)

How To Program In Java (Ipt) With A Bean And An Animated Object In A Powerpoint (For A Powerbook) Graphic Interface Programming II Applets and Beans and animation in Java IT Uppsala universitet Applets Small programs embedded in web pages

More information

Interactive Programs and Graphics in Java

Interactive Programs and Graphics in Java Interactive Programs and Graphics in Java Alark Joshi Slide credits: Sami Rollins Announcements Lab 1 is due today Questions/concerns? SVN - Subversion Versioning and revision control system 1. allows

More information

CSC 551: Web Programming. Spring 2004

CSC 551: Web Programming. Spring 2004 CSC 551: Web Programming Spring 2004 Java Overview Design goals & features platform independence, portable, secure, simple, object-oriented, Programming models applications vs. applets vs. servlets intro

More information

Java is commonly used for deploying applications across a network. Compiled Java code

Java is commonly used for deploying applications across a network. Compiled Java code Module 5 Introduction to Java/Swing Java is commonly used for deploying applications across a network. Compiled Java code may be distributed to different machine architectures, and a native-code interpreter

More information

An Overview of Java. overview-1

An Overview of Java. overview-1 An Overview of Java overview-1 Contents What is Java Major Java features Java virtual machine Java programming language Java class libraries (API) GUI Support in Java Networking and Threads in Java overview-2

More information

Essentials of the Java Programming Language

Essentials of the Java Programming Language Essentials of the Java Programming Language A Hands-On Guide by Monica Pawlan 350 East Plumeria Drive San Jose, CA 95134 USA May 2013 Part Number TBD v1.0 Sun Microsystems. Inc. All rights reserved If

More information

Essentials of the Java(TM) Programming Language, Part 1

Essentials of the Java(TM) Programming Language, Part 1 Essentials of the Java(TM) Programming Language, Part 1 http://developer.java.sun.com/developer...ining/programming/basicjava1/index.html Training Index Essentials of the Java TM Programming Language:

More information

The Basic Java Applet and JApplet

The Basic Java Applet and JApplet I2PUJ4 - Chapter 6 - Applets, HTML, and GUI s The Basic Java Applet and JApplet Rob Dempster [email protected] School of Computer Science University of KwaZulu-Natal Pietermaritzburg Campus I2PUJ4 - Chapter

More information

Tutorial Reference Manual. Java WireFusion 4.1

Tutorial Reference Manual. Java WireFusion 4.1 Tutorial Reference Manual Java WireFusion 4.1 Contents INTRODUCTION...1 About this Manual...2 REQUIREMENTS...3 User Requirements...3 System Requirements...3 SHORTCUTS...4 DEVELOPMENT ENVIRONMENT...5 Menu

More information

WEEK 2 DAY 14. Writing Java Applets and Java Web Start Applications

WEEK 2 DAY 14. Writing Java Applets and Java Web Start Applications WEEK 2 DAY 14 Writing Java Applets and Java Web Start Applications The first exposure of many people to the Java programming language is in the form of applets, small and secure Java programs that run

More information

How To Write A Program For The Web In Java (Java)

How To Write A Program For The Web In Java (Java) 21 Applets and Web Programming As noted in Chapter 2, although Java is a general purpose programming language that can be used to create almost any type of computer program, much of the excitement surrounding

More information

java.applet Reference

java.applet Reference 18 In this chapter: Introduction to the Reference Chapters Package diagrams java.applet Reference Introduction to the Reference Chapters The preceding seventeen chapters cover just about all there is to

More information

There are some important differences between an applet and a standalone Java application, including the following:

There are some important differences between an applet and a standalone Java application, including the following: JAVA - APPLET BASICS Copyright tutorialspoint.com An applet is a Java program that runs in a Web browser. An applet can be a fully functional Java application because it has the entire Java API at its

More information

public class Craps extends JFrame implements ActionListener { final int WON = 0,LOST =1, CONTINUE = 2;

public class Craps extends JFrame implements ActionListener { final int WON = 0,LOST =1, CONTINUE = 2; Lecture 15 The Game of "Craps" In the game of "craps" a player throws a pair of dice. If the sum on the faces of the pair of dice after the first toss is 7 or 11 the player wins; if the sum on the first

More information

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC).

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC). The Abstract Windowing Toolkit Since Java was first released, its user interface facilities have been a significant weakness The Abstract Windowing Toolkit (AWT) was part of the JDK form the beginning,

More information

Object Oriented Programming with Java. School of Computer Science University of KwaZulu-Natal

Object Oriented Programming with Java. School of Computer Science University of KwaZulu-Natal Object Oriented Programming with Java School of Computer Science University of KwaZulu-Natal January 30, 2006 2 Object Oriented Programming with Java Notes for the Computer Science Module Object Oriented

More information

Java History. Java History (cont'd)

Java History. Java History (cont'd) Java History Created by James Gosling et. al. at Sun Microsystems in 1991 "The Green Team" Were to investigate "convergence" technologies Gosling created a processor-independent language for '*7', a 2-way

More information

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

Contents. Java - An Introduction. Java Milestones. Java and its Evolution Contents Java and its Evolution Rajkumar Buyya Grid Computing and Distributed Systems Lab Dept. of Computer Science and Software Engineering The University of Melbourne http:// www.buyya.com Java Introduction

More information

Extending Desktop Applications to the Web

Extending Desktop Applications to the Web Extending Desktop Applications to the Web Arno Puder San Francisco State University Computer Science Department 1600 Holloway Avenue San Francisco, CA 94132 [email protected] Abstract. Web applications have

More information

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY

More information

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution CSE 452: Programming Languages Java and its Evolution Acknowledgements Rajkumar Buyya 2 Contents Java Introduction Java Features How Java Differs from other OO languages Java and the World Wide Web Java

More information

Tip or Technique. Managing Fonts. Product(s): IBM Cognos 8 Area of Interest: Infrastructure

Tip or Technique. Managing Fonts. Product(s): IBM Cognos 8 Area of Interest: Infrastructure Tip or Technique Managing Fonts Product(s): IBM Cognos 8 Area of Interest: Infrastructure Managing Fonts Page 2 of 29 Copyright Copyright 2008 Cognos ULC (formerly Cognos Incorporated). Cognos ULC is an

More information

Chapter 1 Java Program Design and Development

Chapter 1 Java Program Design and Development presentation slides for JAVA, JAVA, JAVA Object-Oriented Problem Solving Third Edition Ralph Morelli Ralph Walde Trinity College Hartford, CT published by Prentice Hall Java, Java, Java Object Oriented

More information

method is never called because it is automatically called by the window manager. An example of overriding the paint() method in an Applet follows:

method is never called because it is automatically called by the window manager. An example of overriding the paint() method in an Applet follows: Applets - Java Programming for the Web An applet is a Java program designed to run in a Java-enabled browser or an applet viewer. In a browser, an applet is called into execution when the APPLET HTML tag

More information

1 Introducción. Capacidades gráficas de JAVA. Java 2D API. Pintar figuras de 2D Uso y control colores Uso y control de fuentes

1 Introducción. Capacidades gráficas de JAVA. Java 2D API. Pintar figuras de 2D Uso y control colores Uso y control de fuentes Graficos Y Java 2D 1 Introducción 2 Contextos y objetos gráficos 3 Colores 4 Fuentes 5 Pintar Líneas, Rectángulos y Óvalos 6 Pintar Arcos 7 Pintar Polígonos and Polilíneas 8 Java2D API 9 Ejemplo 1 Introducción

More information

Graphics Module Reference

Graphics Module Reference Graphics Module Reference John M. Zelle Version 4.1, Fall 2010 1 Overview The package graphics.py is a simple object oriented graphics library designed to make it very easy for novice programmers to experiment

More information

Java SE 6 Update 10. la piattaforma Java per le RIA. Corrado De Bari. Sun Microsystems Italia Spa. Software & Java Ambassador

Java SE 6 Update 10. la piattaforma Java per le RIA. Corrado De Bari. Sun Microsystems Italia Spa. Software & Java Ambassador Java SE 6 Update 10 & JavaFX: la piattaforma Java per le RIA Corrado De Bari Software & Java Ambassador Sun Microsystems Italia Spa 1 Agenda What's news in Java Runtime Environment JavaFX Technology Key

More information

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner 1 vk» Java 7 Recipes (,\['«** - < g!p#«josh Juneau Carl Dea Freddy Guime John O'Conner Contents J Contents at a Glance About the Authors About the Technical Reviewers Acknowledgments Introduction iv xvi

More information

5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung

5.17 GUI. Xiaoyi Jiang Informatik I Grundlagen der Programmierung AWT vs. Swing AWT (Abstract Window Toolkit; Package java.awt) Benutzt Steuerelemente des darunterliegenden Betriebssystems Native Code (direkt für die Maschine geschrieben, keine VM); schnell Aussehen

More information

Java Mouse and Keyboard Methods

Java Mouse and Keyboard Methods 7 Java Mouse and Keyboard Methods 7.1 Introduction The previous chapters have discussed the Java programming language. This chapter investigates event-driven programs. Traditional methods of programming

More information

JavaFX Session Agenda

JavaFX Session Agenda JavaFX Session Agenda 1 Introduction RIA, JavaFX and why JavaFX 2 JavaFX Architecture and Framework 3 Getting Started with JavaFX 4 Examples for Layout, Control, FXML etc Current day users expect web user

More information

Swing. A Quick Tutorial on Programming Swing Applications

Swing. A Quick Tutorial on Programming Swing Applications Swing A Quick Tutorial on Programming Swing Applications 1 MVC Model View Controller Swing is based on this design pattern It means separating the implementation of an application into layers or components:

More information

Image Processing. In this chapter: ImageObserver ColorModel ImageProducer ImageConsumer ImageFilter

Image Processing. In this chapter: ImageObserver ColorModel ImageProducer ImageConsumer ImageFilter 12 In this chapter: ImageObserver ColorModel ImageProducer ImageConsumer ImageFilter Image Processing The image processing parts of Java are buried within the java.awt.image package. The package consists

More information

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2 Dashboard Skin Tutorial For ETS2 HTML5 Mobile Dashboard v3.0.2 Dashboard engine overview Dashboard menu Skin file structure config.json Available telemetry properties dashboard.html dashboard.css Telemetry

More information

Java (12 Weeks) Introduction to Java Programming Language

Java (12 Weeks) Introduction to Java Programming Language Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short

More information

Model-View-Controller (MVC) Design Pattern

Model-View-Controller (MVC) Design Pattern Model-View-Controller (MVC) Design Pattern Computer Science and Engineering College of Engineering The Ohio State University Lecture 23 Motivation Basic parts of any application: Data being manipulated

More information

Here's the code for our first Applet which will display 'I love Java' as a message in a Web page

Here's the code for our first Applet which will display 'I love Java' as a message in a Web page Create a Java Applet Those of you who purchased my latest book, Learn to Program with Java, know that in the book, we create a Java program designed to calculate grades for the English, Math and Science

More information

GUI and Web Programming

GUI and Web Programming GUI and Web Programming CSE 403 (based on a lecture by James Fogarty) Event-based programming Sequential Programs Interacting with the user 1. Program takes control 2. Program does something 3. Program

More information

How to Convert an Application into an Applet.

How to Convert an Application into an Applet. How to Convert an Application into an Applet. A java application contains a main method. An applet is a java program part of a web page and runs within a browser. I am going to show you three different

More information

Ad Hoc Reporting. Usage and Customization

Ad Hoc Reporting. Usage and Customization Usage and Customization 1 Content... 2 2 Terms and Definitions... 3 2.1 Ad Hoc Layout... 3 2.2 Ad Hoc Report... 3 2.3 Dataview... 3 2.4 Page... 3 3 Configuration... 4 3.1 Layout and Dataview location...

More information

Web Development and Core Java Lab Manual V th Semester

Web Development and Core Java Lab Manual V th Semester Web Development and Core Java Lab Manual V th Semester DEPT. OF COMPUTER SCIENCE AND ENGINEERING Prepared By: Kuldeep Yadav Assistant Professor, Department of Computer Science and Engineering, RPS College

More information

Simple Graphics. 2.1 Graphics. In this chapter: Graphics Point Dimension Shape Rectangle Polygon Image MediaTracker

Simple Graphics. 2.1 Graphics. In this chapter: Graphics Point Dimension Shape Rectangle Polygon Image MediaTracker 2 Simple Graphics In this chapter: Graphics Point Dimension Shape Rectangle Polygon Image MediaTracker This chapter digs into the meat of the AWT classes. After completing this chapter, you will be able

More information

Implementação. Interfaces Pessoa Máquina 2010/11. 2009-11 Salvador Abreu baseado em material Alan Dix. Thursday, June 2, 2011

Implementação. Interfaces Pessoa Máquina 2010/11. 2009-11 Salvador Abreu baseado em material Alan Dix. Thursday, June 2, 2011 Implementação Interfaces Pessoa Máquina 2010/11 2009-11 baseado em material Alan Dix 1 Windowing systems Architecture Layers Higher level Tool UI Toolkit (Widgets) Window System OS Application Hardware

More information

JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition.

JAVA. EXAMPLES IN A NUTSHELL. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo. Third Edition. "( JAVA. EXAMPLES IN A NUTSHELL Third Edition David Flanagan O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo Table of Contents Preface xi Parti. Learning Java 1. Java Basics 3 Hello

More information

Applets, RMI, JDBC Exam Review

Applets, RMI, JDBC Exam Review Applets, RMI, JDBC Exam Review Sara Sprenkle Announcements Quiz today Project 2 due tomorrow Exam on Thursday Web programming CPM and servlets vs JSPs Sara Sprenkle - CISC370 2 1 Division of Labor Java

More information

Fundamentals of Java Programming

Fundamentals of Java Programming Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors

More information

LAYOUT MANAGERS. Layout Managers Page 1. java.lang.object. java.awt.component. java.awt.container. java.awt.window. java.awt.panel

LAYOUT MANAGERS. Layout Managers Page 1. java.lang.object. java.awt.component. java.awt.container. java.awt.window. java.awt.panel LAYOUT MANAGERS A layout manager controls how GUI components are organized within a GUI container. Each Swing container (e.g. JFrame, JDialog, JApplet and JPanel) is a subclass of java.awt.container and

More information

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1 The Java Series Java Essentials I What is Java? Basic Language Constructs Slide 1 What is Java? A general purpose Object Oriented programming language. Created by Sun Microsystems. It s a general purpose

More information

Source Code Translation

Source Code Translation Source Code Translation Everyone who writes computer software eventually faces the requirement of converting a large code base from one programming language to another. That requirement is sometimes driven

More information

Chapter 1 Programming Languages for Web Applications

Chapter 1 Programming Languages for Web Applications Chapter 1 Programming Languages for Web Applications Introduction Web-related programming tasks include HTML page authoring, CGI programming, generating and parsing HTML/XHTML and XML (extensible Markup

More information

How to Develop Accessible Linux Applications

How to Develop Accessible Linux Applications Sharon Snider Copyright 2002 by IBM Corporation v1.1, 2002 05 03 Revision History Revision v1.1 2002 05 03 Revised by: sds Converted to DocBook XML and updated broken links. Revision v1.0 2002 01 28 Revised

More information

Syllabus for CS 134 Java Programming

Syllabus for CS 134 Java Programming - Java Programming Syllabus Page 1 Syllabus for CS 134 Java Programming Computer Science Course Catalog 2000-2001: This course is an introduction to objectoriented programming using the Java language.

More information

Course Name: Course in JSP Course Code: P5

Course Name: Course in JSP Course Code: P5 Course Name: Course in JSP Course Code: P5 Address: Sh No BSH 1,2,3 Almedia residency, Xetia Waddo Duler Mapusa Goa E-mail Id: [email protected] Tel: (0832) 2465556 (0832) 6454066 Course Code: P5 3i

More information

Web Authoring. www.fetac.ie. Module Descriptor

Web Authoring. www.fetac.ie. Module Descriptor The Further Education and Training Awards Council (FETAC) was set up as a statutory body on 11 June 2001 by the Minister for Education and Science. Under the Qualifications (Education & Training) Act,

More information

Web Designing with UI Designing

Web Designing with UI Designing Dear Student, Based upon your enquiry we are pleased to send you the course curriculum for Web Designing Given below is the brief description for the course you are looking for: Web Designing with UI Designing

More information

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file. Creative Specs Gmail Sponsored Promotions Overview The GSP creative asset will be a ZIP folder, containing four components: 1. Teaser text file 2. Teaser logo image 3. HTML file with the fully expanded

More information

Using A Frame for Output

Using A Frame for Output Eventos Roteiro Frames Formatting Output Event Handling Entering Data Using Fields in a Frame Creating a Data Entry Field Using a Field Reading Data in an Event Handler Handling Multiple Button Events

More information

Fireworks CS4 Tutorial Part 1: Intro

Fireworks CS4 Tutorial Part 1: Intro Fireworks CS4 Tutorial Part 1: Intro This Adobe Fireworks CS4 Tutorial will help you familiarize yourself with this image editing software and help you create a layout for a website. Fireworks CS4 is the

More information

CS 335 Lecture 06 Java Programming GUI and Swing

CS 335 Lecture 06 Java Programming GUI and Swing CS 335 Lecture 06 Java Programming GUI and Swing Java: Basic GUI Components Swing component overview Event handling Inner classes and anonymous inner classes Examples and various components Layouts Panels

More information

Forest Stewardship Council

Forest Stewardship Council PART IV: GRAPHIC RULES 10 FSC LABELS FSC FSC Mix FSC Recycled From responsible sources Made from recycled material Color and font 10.1 Positive green is the standard preferred color. Negative green and

More information

Hypercosm. Studio. www.hypercosm.com

Hypercosm. Studio. www.hypercosm.com Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks

More information

BCA 421- Java. Tilak Maharashtra University. Bachelor of Computer Applications (BCA) 1. The Genesis of Java

BCA 421- Java. Tilak Maharashtra University. Bachelor of Computer Applications (BCA) 1. The Genesis of Java Tilak Maharashtra University Bachelor of Computer Applications (BCA) BCA 421- Java 1. The Genesis of Java Creation of Java, Why it is important to Internet, characteristics of Java 2. Basics of Programming

More information

How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For

How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For How-to Guide: MIT DLC Drupal Cloud Theme This guide will show you how to take your initial Drupal Cloud site... and turn it into something more like this, using the MIT DLC Drupal Cloud theme. See this

More information

Chapter 13 Computer Programs and Programming Languages. Discovering Computers 2012. Your Interactive Guide to the Digital World

Chapter 13 Computer Programs and Programming Languages. Discovering Computers 2012. Your Interactive Guide to the Digital World Chapter 13 Computer Programs and Programming Languages Discovering Computers 2012 Your Interactive Guide to the Digital World Objectives Overview Differentiate between machine and assembly languages Identify

More information

Designing and Implementing Forms 34

Designing and Implementing Forms 34 C H A P T E R 34 Designing and Implementing Forms 34 You can add forms to your site to collect information from site visitors; for example, to survey potential customers, conduct credit-card transactions,

More information

Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00

Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00 Course Page - Page 1 of 12 Mobile Web Design with HTML5, CSS3, JavaScript and JQuery Mobile Training BSP-2256 Length: 5 days Price: $ 2,895.00 Course Description Responsive Mobile Web Development is more

More information

MiniDraw Introducing a framework... and a few patterns

MiniDraw Introducing a framework... and a few patterns MiniDraw Introducing a framework... and a few patterns What is it? [Demo] 2 1 What do I get? MiniDraw helps you building apps that have 2D image based graphics GIF files Optimized repainting Direct manipulation

More information

Periodontology. Digital Art Guidelines JOURNAL OF. Monochrome Combination Halftones (grayscale or color images with text and/or line art)

Periodontology. Digital Art Guidelines JOURNAL OF. Monochrome Combination Halftones (grayscale or color images with text and/or line art) JOURNAL OF Periodontology Digital Art Guidelines In order to meet the Journal of Periodontology s quality standards for publication, it is important that authors submit digital art that conforms to the

More information

Part 1 Foundations of object orientation

Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 1 Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 2 1 OFWJ_C01.QXD 2/3/06 2:14 pm Page 3 CHAPTER 1 Objects and classes Main concepts discussed

More information

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives Introduction to Programming and Algorithms Module 1 CS 146 Sam Houston State University Dr. Tim McGuire Module Objectives To understand: the necessity of programming, differences between hardware and software,

More information

CLASSROOM WEB DESIGNING COURSE

CLASSROOM WEB DESIGNING COURSE About Web Trainings Academy CLASSROOM WEB DESIGNING COURSE Web Trainings Academy is the Top institutes in Hyderabad for Web Technologies established in 2007 and managed by ITinfo Group (Our Registered

More information

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS An Excel Pivot Table is an interactive table that summarizes large amounts of data. It allows the user to view and manipulate

More information

Generating Automated Test Scripts for AltioLive using QF Test

Generating Automated Test Scripts for AltioLive using QF Test Generating Automated Test Scripts for AltioLive using QF Test Author: Maryam Umar Contents 1. Introduction 2 2. Setting up QF Test 2 3. Starting an Altio application 3 4. Recording components 5 5. Performing

More information

Garfield Public Schools Fine & Practical Arts Curriculum Web Design

Garfield Public Schools Fine & Practical Arts Curriculum Web Design Garfield Public Schools Fine & Practical Arts Curriculum Web Design (Half-Year) 2.5 Credits Course Description This course provides students with basic knowledge of HTML and CSS to create websites and

More information

understand how image maps can enhance a design and make a site more interactive know how to create an image map easily with Dreamweaver

understand how image maps can enhance a design and make a site more interactive know how to create an image map easily with Dreamweaver LESSON 3: ADDING IMAGE MAPS, ANIMATION, AND FORMS CREATING AN IMAGE MAP OBJECTIVES By the end of this part of the lesson you will: understand how image maps can enhance a design and make a site more interactive

More information

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: ADVANCE JAVA PROGRAMMING (COURSE CODE: 3360701)

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: ADVANCE JAVA PROGRAMMING (COURSE CODE: 3360701) GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT COURSE CURRICULUM COURSE TITLE: ADVANCE JAVA PROGRAMMING (COURSE CODE: 3360701) Diploma Programme in which this course is offered Computer Engineering/

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

Session 12 Evolving IT Architectures: From Mainframes to Client-Server to Network Computing

Session 12 Evolving IT Architectures: From Mainframes to Client-Server to Network Computing Session 12 Evolving IT Architectures: From Mainframes to Client- to Network Computing S. Madnick, 1998 12/ 1 Outline Stages of System Architectures Components: Data Management,, Mainframe era PC era Stages

More information

How To Use A Sas Server On A Java Computer Or A Java.Net Computer (Sas) On A Microsoft Microsoft Server (Sasa) On An Ipo (Sauge) Or A Microsas (Sask

How To Use A Sas Server On A Java Computer Or A Java.Net Computer (Sas) On A Microsoft Microsoft Server (Sasa) On An Ipo (Sauge) Or A Microsas (Sask Exploiting SAS Software Using Java Technology Barbara Walters, SAS Institute Inc., Cary, NC Abstract This paper describes how to use Java technology with SAS software. SAS Institute currently offers several

More information

Contents. Downloading the Data Files... 2. Centering Page Elements... 6

Contents. Downloading the Data Files... 2. Centering Page Elements... 6 Creating a Web Page Using HTML Part 1: Creating the Basic Structure of the Web Site INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 2.0 Winter 2010 Contents Introduction...

More information

IE Class Web Design Curriculum

IE Class Web Design Curriculum Course Outline Web Technologies 130.279 IE Class Web Design Curriculum Unit 1: Foundations s The Foundation lessons will provide students with a general understanding of computers, how the internet works,

More information

Visual Basic Programming. An Introduction

Visual Basic Programming. An Introduction Visual Basic Programming An Introduction Why Visual Basic? Programming for the Windows User Interface is extremely complicated. Other Graphical User Interfaces (GUI) are no better. Visual Basic provides

More information

Table of Contents. I. Banner Design Studio Overview... 4. II. Banner Creation Methods... 6. III. User Interface... 8

Table of Contents. I. Banner Design Studio Overview... 4. II. Banner Creation Methods... 6. III. User Interface... 8 User s Manual Table of Contents I. Banner Design Studio Overview... 4 II. Banner Creation Methods... 6 a) Create Banners from scratch in 3 easy steps... 6 b) Create Banners from template in 3 Easy Steps...

More information

Microsoft Expression Web Quickstart Guide

Microsoft Expression Web Quickstart Guide Microsoft Expression Web Quickstart Guide Expression Web Quickstart Guide (20-Minute Training) Welcome to Expression Web. When you first launch the program, you ll find a number of task panes, toolbars,

More information

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Introduction Client-Side scripting involves using programming technologies to build web pages and applications that are run on the client (i.e.

More information

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green Red = 255,0,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (184,27,26) Equal Luminance Gray for Red = 255,0,0 (147,147,147) Mean of Observer Matches to Red=255

More information

LAMBDA CONSULTING GROUP Legendary Academy of Management & Business Development Advisories

LAMBDA CONSULTING GROUP Legendary Academy of Management & Business Development Advisories Curriculum # 05 Four Months Certification Program WEB DESIGNING & DEVELOPMENT LAMBDA CONSULTING GROUP Legendary Academy of Management & Business Development Advisories The duration of The Course is Four

More information