Java The Beginning. Why Java?  Currently, this is the language of the international AP course which runs Feb-Apr  FREE!  Platform-independent  Simple.

Slides:



Advertisements
Similar presentations
ITEC 1001 Tutorial 1 Using Common Features of Microsoft Office 2003.
Advertisements

Dreamweaver MX 2004 “Viewing the Workspace” Mrs. Wilson.
In Review JAVA C++ GUIs - Windows Webopedia.com.
Java Applets:. How Applets differ from application?: They do not use main method but init(), start() and paint() methods of the applet class They can.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
Java Chapter 22 - Student. Why Java? ADVANTAGESDISADVANTAGES Has _____________ capabilities__________ ( times) than languages compiled directly.
Applets. An applet is a Panel that allows interaction with a Java program A applet is typically embedded in a Web page and can be run from a browser You.
Introduction to Java A lab course by Dr. Junaid Ahmed Zubairi SUNY Fredonia.
XP 1 Using Common Features of Microsoft Office 2003 Rod Rodrigues.
Computer Science A 5: 17/2. JCreator IDE: Integrated Development Editor Features: Compile and run from editor Manage multiple files Can look up api documentation.
XP Using Common Features of Microsoft Office Tutorial 1.
PHY281Introduction to JavaSlide 1 Introduction to Java In this section we will learn how how to use Java and write our first Java Applet:  The Java Development.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Programming Task: Task 1 Controlled Assessment Practice.
CPSC 203 Introduction to Computers Lab 39, 40 By Jie (Jeff) Gao.
®® Microsoft Windows 7 Windows Tutorial 6 Searching for Information and Collaborating with Others.
Digital Image Processing Lecture3: Introduction to MATLAB.
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
Java Programming, 3e Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
1 eclipse Tips. 2 What is eclipse? Eclipse is a popular IDE (Integrated Development Environment) that we will use to create, compile, execute, and test.
CS413: Java Programming language Applications Applets
Programming Fundamentals 2: Background/ F II Objectives – –give a non-technical overview of Java Semester 2, Background.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
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.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Learn about the types of Graphics that are available Develop a basic Graphics applet Develop a basic Graphics application Review the Java API and use.
Chapter 17: Applets, Images, and Sound. Objectives Learn about applets Write an HTML document to host an applet Use the init() method Work with JApplet.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Putting Applets into Web Pages.  Two things are involved in the process of putting applets onto web pages ◦ The.class files of the applet ◦ The html.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
1 Week 1 l HTML l Applets Applets and HTML. 2 Overview l Applets: Java programs designed to run from a document on the Internet l HTML: Hypertext Markup.
1 Computer Programming (ECGD2102 ) Using MATLAB Instructor: Eng. Eman Al.Swaity Lecture (1): Introduction.
POS 406 Java Technology And Beginning Java Code
CIS3023: Programming Fundamentals for CIS Majors II Summer 2010 Ganesh Viswanathan Introduction to Applets Course Lecture Slides 29 th July 2010.
CS 3131 Introduction to Programming in Java Rich Maclin Computer Science Department.
JCreator Tonga Institute of Higher Education. Programming with the command line and notepad is difficult. DOS disadvantages  User Interface (UI) is not.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
CHAPTER 3 GC Java Fundamentals. 2 BASICS OF JAVA ENVIRONMENT  The environment  The language  Java applications programming Interface API  Various.
Creating Projects in JCreator Computer Science 40S.
C# AND ASP.NET What will I do in this course?. MAJOR TOPICS Learn to program in the C# language with the Visual Studio IDE (Interactive Development Environment)
1 Applets and Course Evaluation Applet Example - Sailing Applet UML Diagrams Applet Web Page Encoding (HTML) Applet Java Coding – Hello World Course Evaluation.
COP2800 – Computer Programming Using JAVA University of Florida Department of CISE Spring 2013 Lecture 35 – Overview of Java Web Programming Webpage:
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Applets Yong Choi School of Business CSU, Bakersfield.
1 CSE1340 Class 4. 2 Objectives Write a simple computer program in Java Use Swing components to build the GUI Use proper naming conventions for classes.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and web applications Very rich GUI libraries Portability (machine independence) A real Object.
Java Methods Methods contain a group of instructions that together perform a single task. For example if I want to perform the task of “making a pizza”,
Intro to Applets. Applet Applets run within the Web browser environment Applets bring dynamic interaction and live animation to an otherwise static HTML.
Guide to MCSE , Enhanced1 Activity 11-1: Using Task Manager to Manage Applications and Processes Objective: To explore managing applications and.
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Creating a Java Application and Applet
GAME:IT Intro to Game Maker Studio. GAME MAKER STUDIO  This course uses a program called Game Maker Studio  Game Maker Studio is an “open source” software.
CHAPTER Agenda Applets Servelets Browsers HelloWorld.
IT11 Agenda for Feb Golden Rule Reminder. 2. PowerPoint demonstration on the structure of Java Applet programs. Source Files HTML Files Class Files.
XP New Perspectives on Creating Web Pages With Word Tutorial 1 1 Creating Web Pages With Word Tutorial 1.
Slides prepared by Rose Williams, Binghamton University ICS201 Lecture 17 : Applets King Fahd University of Petroleum & Minerals College of Computer Science.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Applications Active Web Documents Active Web Documents.
Chapter Two Applet vs. Application
Java programming lecture one
Social Media And Global Computing Introduction to Visual Studio
Understanding the Visual IDE
JAVA APPLET PREPARED BY Mr. Jahanzaib Ahmed
APPLET PROGRAMMING.
Presentation transcript:

Java The Beginning

Why Java?  Currently, this is the language of the international AP course which runs Feb-Apr  FREE!  Platform-independent  Simple to learn but powerful  Used in Flash Actionscript  Used in Android programming

What can Java do? Java can be used to develop many types of applications. Java Applications are standalone programs that run on the desktop. They can be:  Console apps  simple, text-based programs that support text IO to the monitor  GUI apps  can have menus, toolbars, buttons, etc. Applets run in a browser and easily shared over the Internet.

Java Applet In Jcreator, create a new workspace named Applets. Save your applets into this workspace. Each new applet will be a new project. Create a new Basic Java Applet. Replace all the code in it with the code from below. Note the corresponding htm file that is created for you, saving you creating it manually.

 Java filenames must match the class name exactly.  Java is case-sensitive  Java code is compiled, creating a file with the. class extension. You can see this file in windows explorer.  Applets run through a browser, and therefore require an htm file. JCreator will create this for you, or you can create one manually.  New security on java apps has made browser testing difficult. JCreator features an applet viewer making testing easier.

Libraries  A library is a collection of useful classes.  Use the import statement to make a library available to your program.  You will use several libraries in this course, such as java.awt and javax.swing.

Structure of a Java Program  Java programs are made up of a number files called classes, each one performing a specific task.  One class in the program will contain the main() method, which the computer searches for to get things running.  An applet will have a paint() method that is called automatically when it is started.  Inside of a class we have methods and instance variables.

Naming Conventions  Classes are named in TitleCase  Methods are named in camelCase and always have ()  Variables are named in camelCase  Constants (aka finals ) are UPPER-CASE.

Java Help  The best help for java is the java api on the Internet. Try  Look up the drawString method api.

Close your workspace, and create a new Blank Workspace for Applications. Add a New Project named HelloWorld. It will come up similar to below. Alter yours to match this and make sure it compiles and runs.

Close your workspace, and create a new Blank Workspace for GUI-Apps. Add a New Project named HelloWorldGUI. It will come up similar to below. Alter yours to match this and make sure it compiles and runs.

An Applet with Graphics  Close your workspace and open the Applet workspace.  Add a new applet project named ShapesAndColors. The api can give you more information on possible graphics methods that you may use to create a unique image.

Work on Lab 01D – Robot. All required files are on the shared drive.