Learning objectives By the end of this lecture you should be able to:  have a well-earned rest! Ch 24 Beyond the second semester.

Slides:



Advertisements
Similar presentations
G5BUID - Java Swing What is Swing? A part of The Java Foundation Classes Swing Look and feel Accessibility Java 2D (Java 2 onwards) Drag and Drop.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
ORACLE Lecture 1: Oracle 11g Introduction & Installation.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Java Programming, 3e Concepts and Techniques Chapter 5 Arrays, Loops, and Layout Managers Using External Classes.
Distributed Application Development B. Ramamurthy.
Automating Tasks With Macros
Slides prepared by Rose Williams, Binghamton University Chapter 17 Swing I.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
1 C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California
J2EE Java 2 Enterprise Edition. Relevant Topics in The Java Tutorial Topic Web Page JDBC orial/jdbc
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Introducing JavaBeans Lesson 2A / Slide 1 of 30 JDBC and JavaBeans Pre-assessment Questions 1.Which of the given symbols is used as a placeholder for PreparedStatement.
Introducing JavaBeans Identify the features of a JavaBean Create and add a bean to an application Manipulate bean properties using accessor and mutator.
Access Tutorial 10 Automating Tasks with Macros
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
1 Integrated Development Environment Building Your First Project (A Step-By-Step Approach)
Chapter 10 EJB Concepts of EJB Three Components in Creating an EJB Starting/Stopping J2EE Server and Deployment Tool Installation and Configuration of.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
Java Database Connectivity (JDBC) Francisco Pajaro Saul Acosta Nahum Quezada Manuel Rubio.
Java Beans.
Databases and LINQ Visual Basic 2010 How to Program 1.
ACM/JETT Workshop - August 4-5, ExceptionHandling and User Interfaces (Event Delegation, Inner classes) using Swing.
Database Programming in Java Corresponds with Chapter 32, 33.
© D. Wong  Indexes  JDBC  JDBC in J2EE (Java 2 Enterprise Edition)
COMP 410 & Sky.NET May 2 nd, What is COMP 410? Forming an independent company The customer The planning Learning teamwork.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Event Driven Programming
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
Slides prepared by Rose Williams, Binghamton University ICS201 Lecture 13 : Swing I King Fahd University of Petroleum & Minerals College of Computer Science.
– Advanced Programming P ROGRAMMING IN Lecture 21 Introduction to Swing.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Java Database Connectivity (JDBC). Topics 1. The Vendor Variation Problem 2. SQL and Versions of JDBC 3. Creating an ODBC Data Source 4. Simple Database.
ABSTRACT The JDBC (Java Database Connectivity) API is the industry standard for database- independent connectivity between the Java programming language.
® Microsoft Access 2010 Tutorial 10 Automating Tasks with Macros.
Introduction to Java Beans CIS 421 Web-based Java Programming.
Applets Yong Choi School of Business CSU, Bakersfield.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Object Oriented Programming.  Interface  Event Handling.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
UNIT III - JDBC JDBC Overview – JDBC implementation – Connection class – Statements - Catching Database Results, handling database Queries. Networking–
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Basics of JDBC Session 14.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Lecture # 6 Graphical User Interface(GUI). Introduction A graphical user interface (GUI) presents a user- friendly mechanism for interacting with an application.
April 20, 1998CS102-02Lecture 4-1 A Method to the Madness CS Lecture 4-1 Java's Work Horses.
Slides prepared by Rose Williams, Binghamton University Chapter 20 Java Never Ends.
Swing GUI Components So far, we have written GUI applications which can ‘ draw ’. These applications are simple, yet typical of all Java GUI applications.
In the Name Of Almighty Allah. Java Application Connection To Mysql Created by Hasibullah (Sahibzada) Kabul Computer Science Faculty Afghanistan.
CSC 205 Programming II Lecture 5 AWT - I.
Java swings.
JDBC Database Management Database connectivity
Chapter Topics 15.1 Graphical User Interfaces
Introduction to Visual Basic 2008 Programming
MSIS 655 Advanced Business Applications Programming
Java Database Connectivity
Chapter 15: GUI Applications & Event-Driven Programming
Constructors, GUI’s(Using Swing) and ActionListner
Java API for Database Connectivity
Tutorial 10 Automating Tasks with Macros
Presentation transcript:

Learning objectives By the end of this lecture you should be able to:  have a well-earned rest! Ch 24 Beyond the second semester

Rapid Application Development (RAD) The RAD approach to program development involves sophisticated development tools for automating or simplifying tasks that would otherwise have to be coded by the programmer. This greatly speeds up development time and so increases productivity. In particular RAD programming tools help significantly in the production of graphical user interfaces.

The PushMe application revisited After pushing the button Before pushing the button

A typical RAD environment Graphical components, such as AWT Buttons and Labels are selected from a palette Here, an AWT Frame has been selected Here the Design view is selected so the actual appearance of the Frame can be seen. Clicking the Source view shows us the Java code that has been generated. The look and behaviour of the graphical component selected can be changed from this list.

Building the GUI Rather than hard coding the selection and appearance of GUI components, the RAD tool allows you to pick them from a palette: The appearance of these GUI components on the Frame does not match exactly the appearance we are after so we can customise them.

Customising the GUI Each component’s look can be modified by changing its properties in the properties list. For example, to change the text on the Label to “Enter some text and push the button” select the Label ’s text property The Label’s text property is selected Then the Label’s text property is modified

Attaching code to the GUI In order for the GUI application to respond to events we still need to write the code for the event handler. If we double click the Button in design view, the RAD tool will automatically assign an actionListener to this button and take us to that part of the generated code that needs completing. void button1_actionPerformed(ActionEvent e) { // code to be complrted goes here } This code will be the same as that developed before.

Java Beans A Java Bean is a more abstract and powerful concept than a simple Java class. A Java Bean is a self contained object that can be used and tested independently of any environment restrictions. A stand-alone visual object is often called a component. Java's AWT and Swing components (which can be found on component palettes of RAD tools) are examples of Java beans.

Writing your own Java beans When you write your own Java bean it can be added to a RAD tools component palette. To make a class into a Java Bean it must meets a set of Java Bean rules which These include ensuring the class is declared public and following strict naming rules for get and set methods for private attributes.

Java Database Connectivity A common model upon which these database applications are based is the relational database model. Data in such a database consists of a collection of tables. SQL (Structured Query Language) is a common language used to retrieve and modify information within tables. Java’s JDBC (Java DataBase Connectivity) API provides a set of classes for communicating with such databases with SQL statements. These classes are found in the java.sql package.

The java.sql package The four main classes in this package are:  DriverManager : loads and sets up the software required to communicate with an external database.  Connection : authenticates and connects the Java program to a database.  PreparedStatement : sends SQL statements to the database for execution.  ResultSet : allows the results of SQL statements to be analysed in the Java program.

Networking The java.rmi and java.net packages provide extensive support for networking and distributed systems development. These packages include classes for simplifying the communication between objects spread over a network and include classes such as Socket, and ServerSocket.