Distributed Information Systems Lecture 7 - Practical Lecture6 Java Client, Lecture notes of Database Management Systems (DBMS)

In this document topics covered which are Developing a Java Client, Introduction, Developing a Java client, What are we building?,Creating the Project, Creating a Package.

Typology: Lecture notes

2010/2011

Uploaded on 09/09/2011

rossi46
rossi46 🇬🇧

4.5

(10)

313 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Distributed Information
Distributed Information
Systems
Systems
Markus A. Wolf & Elena I. Teodorescu
Markus A. Wolf & Elena I. Teodorescu
Practical Lecture 6
Developing a Java Client
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download Distributed Information Systems Lecture 7 - Practical Lecture6 Java Client and more Lecture notes Database Management Systems (DBMS) in PDF only on Docsity!

Distributed InformationDistributed Information

Systems Systems

Markus A. Wolf & Elena I. Teodorescu^ Markus A. Wolf & Elena I. Teodorescu

Practical Lecture 6

Developing a Java Client

Practical Session Structure^ Practical Session Structure

Introduction

Building a business component

Building an admin GUI

Introducing .NET remoting

Creating a web service and clientwebsite

Developing a Java client

Learning Objectives^ Learning Objectives

  • Understand how to create proxies for a

web service in NetBeans

  • Create a standalone Java application that

makes calls on a web serviceimplemented in .NET, thus demonstratingcross-platform interoperability of webservices

Introduction^ Introduction

  • In this practical session we will:
    • Implement a GUI application that enables a

team leader to log in and see a list of tasksthat the project manager (administrator) hasassigned to them

Creating the Project

  • We will create a new project in NetBeans
    • Start NetBeans– Select

File -> New Project

  • From the

Categories

pane select

General

and

from the

Projects

pane select

Java

Application

Creating a Package

  • NetBeans will create a project structure• Let’s create a package for our application
    • Right-click on the

SourcePackages

folder and

select

New -> Java Package

Adding a JFrame

•^

Let’s add a userinterface file to thepackage^ – Right-click on the

newly created

ptsclient

package and select New -> JFrameForm…

  • Name the class

ClientFrame

and click

Finish

  • Creating the Project /
  • Creating the Project /
  • Adding a JFrame /

ClientFrame Design /

•^

Open the ClientFrame class in Design view

-^

From the

Palette

pane (Swing category) drag

the following controls onto the form:^ – 3 JLabels with text set to

Username, Password

and

Your projects

  • 1 JTextField– 1 JPasswordField– 1 JButton– 1 JTextArea

ClientFrame Design /

•^

Rename theJTextField you addedto

txtUsername

  • Right-click on

jTextField

in the

Inspector pane andselect

Change

Variable Name…

  • Enter

txtUsername

as

the new name

ClientFrame Design /

•^

When completed, the form should look like this:

Functionality

•^

The only functionality we will implement is thatwhen the button is pressed the access detailsare checked and, on successful authentication,the list of projects that the team leader isworking on is displayed

-^

We will have three methods:^ – Event handling method called when the button is

pressed

  • authenticate, which performs the authentication– showProjects, which extracts the project information

and displays in in the text area