0% found this document useful (0 votes)
103 views24 pages

Group 4 Presentation

This document contains information about a GUI and databases presentation given by Group 4 to the HCS 406 OOP 2 module at Midlands State University, Department of Computer Science and Information Systems. It discusses graphical user interfaces and how they present easy-to-use visual displays for users to interact with applications. It also provides examples of typical GUI elements and two methods for connecting to a database from a Java application using JDBC. The presentation covers starting the Java DB virtual server and creating a database to connect to from Java code.

Uploaded by

Prince Mavhura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views24 pages

Group 4 Presentation

This document contains information about a GUI and databases presentation given by Group 4 to the HCS 406 OOP 2 module at Midlands State University, Department of Computer Science and Information Systems. It discusses graphical user interfaces and how they present easy-to-use visual displays for users to interact with applications. It also provides examples of typical GUI elements and two methods for connecting to a database from a Java application using JDBC. The presentation covers starting the Java DB virtual server and creating a database to connect to from Java code.

Uploaded by

Prince Mavhura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

MIDLANDS STATE UNIVERSITY

Faculty of science and technology


Department of computer science and information systems

FIRST NAME SURNAME REG NO PROG LEVEL


RAOULT MUJOKERI R165001P HINFO 4.2
MOREBLESSING TSHABALALA R169202F HINFO 4.2
BRIAN MAUMBE R166944C HINFO 4.2
EMMANUEL AARON R145525Q HINFO 4.2
TINASHE MAKARABGWA R144478M HINFO 4.2
EDWIN MAKAMURE R164935M HINFO 4.2
ALBERT MAVHONDO R166487W HINFO 4.2
AARON MUNGATE R153530B HINFO 4.2
HONEST MUTAMBA R164697C HINFO 4.2
RONALD MUTASA R155481C HINFO 4.2
LLOYD RUSIMBA R163094B HINFO 4.2

Module : HCS 406 OOP 2

Lecturer : Mr S FURUSA
GROUP 4 PRESENTATION

GUI AND DATABASES

Graphical user interface , a term used not only in java but in all programming languages that
support the development of GUI’s. A program’s graphical user interface presents an easy to use
visual display to the user. It is made up of graphical components ( e.g., buttons , labels , windows
) through which the user can interact with the page or application.

Typical Elements of GUI

The GUI includes a range of user interface elements which just means all the elements that display
when you are working in an application. These can include:

 Input controls such as buttons , dropdown lists , checkboxes and text fields.
 Informational elements such as labels , banners , icons , or notification dialogs.
 Navigational elements , including sidebars , breadcrumbs, and menus.

• There are two methods of connecting to a database

1.) Creating connection object within the same class

(2) creating a connection class and accessing it within the second class

import javax.swing.*;

import java.awt.event.*;

import java.sql.*;

public class Dbexample implements ActionListener {

JFrame f;

JButton b;

JComboBox cb;

JTextField name;

JLabel lbl1, lbl2;


Dbexample(){

lbl1= new JLabel("Country");

lbl2= new JLabel("Name");

f=new JFrame("Combo ex");

name= new JTextField(13);

b= new JButton("Ok");

String country[]={"India","Aus","U.S.A","England","Newzeland"};

cb=new JComboBox(country);

lbl1.setBounds(2,50,90,20);

cb.setBounds(50, 50,90,20);

lbl2.setBounds(2,90 ,90,20);

name.setBounds(50, 90, 90,20);

b.setBounds(50, 130,90,20);

f.add(lbl1);

f.add(cb);

f.add(lbl2);

f.add(name);

f.add(b);

b.addActionListener(this);

f.setLayout(null);

f.setSize(400,500);

f.setVisible(true);

}
public void actionPerformed(ActionEvent e){

if(e.getSource()==b){

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/emp","root","");

//here emp is the database name, root is username and the password is blank

Statement stmt=con.createStatement();

int i= stmt.executeUpdate("insert into detail values(NULL, '" + name.getText() + "',' " +


cb.getSelectedItem() + " ')");

if (i==1) System.out.println("Successfully inserted value");

f.dispose();

new Dbexample();

con.close();

}catch(Exception e1){ System.out.println(e1);}

public static void main(String[] args) {

new Dbexample();

Method 2
- The logic behind this is that we have to first create the connection class be sure to make
the class variables public

import java.sql.*;

public class connection

public Connection con = null;

public Statement stmt = null;

public ResultSet rs = null;

public void open(){

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/emp","root","");

stmt =
con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ON
LY);

catch(Exception e) {

System.out.println(e); }

public void close()

try{

stmt.close();
con.close();

catch(Exception e)

System.out.println(e);

- Then we can add the Dbexample.java file

import javax.swing.*;

import java.awt.event.*;

import java.sql.*;

public class Dbexample implements ActionListener {

connection cn = new connection();

JFrame f;

JButton b;

JComboBox cb;

JTextField name;

JLabel lbl1, lbl2;

Dbexample(){

lbl1= new JLabel("Country");

lbl2= new JLabel("Name");

f=new JFrame("Combo ex");


name= new JTextField(13);

b= new JButton("Ok");

String country[]={"India","Aus","U.S.A","England","Newzeland"};

cb=new JComboBox(country);

lbl1.setBounds(2,50,90,20);

cb.setBounds(50, 50,90,20);

lbl2.setBounds(2,90 ,90,20);

name.setBounds(50, 90, 90,20);

b.setBounds(50, 130,90,20);

f.add(lbl1);

f.add(cb);

f.add(lbl2);

f.add(name);

f.add(b);

b.addActionListener(this);

f.setLayout(null);

f.setSize(400,500);

f.setVisible(true);

public void actionPerformed(ActionEvent e){

if(e.getSource()==b){

try{

cn.open();
int i= cn.stmt.executeUpdate("insert into detail values(NULL, '" + name.getText() + "',' " +
cb.getSelectedItem() + " ')");

if (i==1) System.out.println("Successfully inserted value"); f.dispose();

new Dbexample();

cn.close();

}catch(Exception e1){ System.out.println(e1);}

public static void main(String[] args) {

new Dbexample();

Databases

Java uses something called JDBC (Java Database Connectivity) to connect to databases. There's a
JDBC API, which is the programming part, and a JDBC Driver Manager, which your programmes
use to connect to the database.

JDBC allows you to connect to a wide-range of databases (Oracle, MySQL, etc), but we're going
to use the in-built database you get with the Java/NetBeans software. The database is called Java
DB, a version of Apache Derby. It runs on a virtual server, which you can stop and start from
within NetBeans.
To check that have everything you need, have a look at the Services tab in NetBeans. If you can't
see the Services tab, click Window from the NetBeans menu. From the Window menu,
select Services. You should see something like this:
The idea is that you start the Java DB virtual server, and then create and manipulate databases on
the server. There should be a database called sample already set up: (But don't worry if it's not
there as we'll create our own database.)

In the image above, there are three databases: one is called sample, one is called test1, and the
other is called exams.

For the project in this section, we're going to set up a new database. You'll then learn how to
connect to this database using Java code. The database we'll create will be a simple one-table affair,
rather than multiple tables connected together. You can indeed create multiple tables with Java
DB, but we don't want to complicate things unnecessarily.

Starting the Virtual Server

The first thing to do is to start the server. So right click on Java DB. You'll see a menu appear.
Select Start Server:
JAVA GUI

GUI stands for Graphical User Interface, a term used not only in Java but in all programming
languages that support the development of GUIs. A program's graphical user interface presents an
easy-to-use visual display to the user. It is made up of graphical components (e.g., buttons, labels,
windows) through which the user can interact with the page or application.

To make graphical user interfaces in Java, use either Swing (older applications) or JavaFX.
Typical Elements

A GUI includes a range of user interface elements — which just means all the elements that
display when you are working in an application. These can include:

Input controls such as buttons, dropdown lists, checkboxes, and text fields.Informational elements
such as labels, banners, icons, or notification dialogs.Navigational elements, including sidebars,
breadcrumbs, and menus.

Java GUI Frameworks: Swing and JavaFX

Java has included Swing, an API for creating GUIs, in its Java Standard Edition since Java 1.2, or
2007. It's designed with a modular architecture so that elements are easily plug-and-play and can
be customized. It has long been the API of choice for Java developers when creating GUIs.

JavaFX has also been around a long time — Sun Microsystems, which owned Java before the
current owner Oracle, released the first version in 2008, but it didn't really gain traction until Oracle
purchased Java from Sun.

Design and Usability

If you're an application developer, you need to consider not only the tools and programming
widgets you will use to create your GUI, but also be aware of the user and how he will interact
with the application.

For example, is the application intuitive and easy to navigate? Can your user find what he needs
in the expected places? Be consistent and predictable about where you place things — for instance,
users are familiar with navigational elements on top menu bars or left sidebars. Adding navigation
in a right sidebar or on the bottom will only make the user experience more difficult.

Other issues might include the availability and power of any search mechanism, the behavior of
the application when an error occurs, and, of course, the general aesthetics of the application.
GUI JAVA

One of the big advances that Java made when it was introduced in 1995 was the inclusion of
standardized "graphical user interface" ("GUI") libraries. This was a tremendous leap forward
over the bewildering array of incompatible third-party libraries that were the only avenues
previously open to GUI developers. The Java GUI library was also one of the first major software
packages to explicitly describe its architecture in terms of the then-brand-new language of Design
Patterns.

Main Packages

One confusing aspect of the Java GUI system however is a legacy issue where the system
underwent a large-scale upgrade in 1997, so some of the classes involved are spread over the
(relatively) older java.awt packages and the newer javax.swing packages. In general, if the class
name starts with "J", then it is in the Swing package. Since some functionality appears to be
duplicated in the Swing packages, such as frames and buttons, always use the Swing component
over the older AWT components when there is a choice.

java.awt -- Contains the main superclasses for the GUI components plus a number of utility type
classes, such as Color and Point.java.awt.event -- Contains the classes and interfaces for managing
events from the GUI components, e.g. button clicks and mouse movements.javax.swing --
Contains most of the visible GUI components that are used such as buttons, text fields, frames and
panels.

The Java GUI Subsystem

The Java GUI subsystem consists of a separate, automous task execution thread called the "event
loop". Every action that affects the GUI, e.g. calls to repaint the screen or to manipulate the
properties of a GUI component, or is a result of something happening to the GUI, e.g. the user
clicks the mouse or hits a key, is encapsulated in the form of an "event" that is placed into a queue
for the event loop to process. The result of processing an event may be a manipulation of the bits
of color on the screen or it may result in calls to methods in the developer's code.

If we look at the process to handle the clicking of a button, what we see is that the user's mouse
click sets off a chain of events. The button object responds to the mouse click by creating a button
click event that is placed into the event queue. The event loop, when it is free to do so, picks up
that event and processes it. The processing of a button click event involves calling methods on
specially registered objects called "listeners" who are "listening" for the click event. The listeners
for a button click are objects implementing the java.awt.ActionListener interface and the button
click event processing involves calling the listener's actionPerformedmethod, which the developer
has implemented to do whatever is needed when that particular button is clicked. Note that
multiple listeners may be "added" to any given button and the button click processing will call
each ActionListener's actionPerformed method in turn.

In the other direction, if we look at the painting process, supposed the developer's code wishes to
call repaint a frame component on the screen. The developer's code will call the repaint() method
of the frame, but all that does is to generate a repaint event that is placed into the event queue along
with all the other events. When the event loop is able, it processes that repaint event and in doing
so, the GUI subsystem will generate a specialjava.awt.Graphics instance that is used to represent
the physical screen of the computer. This Graphics object is passed as an input parameter to a call
to the paintComponent method of the frame. (Technically, the system calls the
frame's paint() method which in turn callspaintComponent(), but we don't need to worry about
that.) Since the frame is a container, it as any good Composite Design pattern implementation
will do, in turn calls the paintComponent method of all of its sub-components. If one of those
components is itself a container, then the painting process cascades down the composite tree until
every component has had a chance to paint itself upon the screen (the Graphics object). The
developer can insert custom painting operations by simply overriding the paintComponent method
of the desired component.
Commonly Used ClassesSimple Components

javax.swing.JLabel -- A piece of non-editable text on the screen.

javax.swing.JButton -- A button that can be clicked. Clicking the button will cause
its actionPerformed event to be fired which will call all
installed ActionListener's actionPerformedmethods.

javax.swing.JTextField -- A single line of user-editable text.

javax.swing.JTextArea -- A box with multiple lines of text displayed. Can be set for editable or
non-editable.

javax.swing.JRadioButton, javax.swing.JCheckBox -- Small round or square boxes that can be


clicked on to indicate the selection of something, such as an option of some sort. Clicking the
radio button or check box will fire a particular type of event. Radio buttons can be grouped
together using an invisible (to the user) class called javax.swing.ButtonGroup to create a set where
only one button can be set at a time.

javax.swing.JComboBox -- A drop-list of items. A JComboBox holds a set of Objects, not


just Strings. The displayed texts are the return values of the item's toString() method. Thus
a JComboBox can be used to hold arbitrary entities without the GUI knowing what those entities
are. Events are fired only when the selected item changes, though the currently selected item and
its index can always be retrieved.
Container Components

javax.swing.JFrame -- a stand-alone "window" or "frame" with a title and the usual abilities to be
moved, resized, minimized, maximized and closed. For most people, this is the top-level
container in their system. Thus a JFrame cannot hold another JFrame. While a JFramecan hold
any type of component, typically, a JFrame holds JPanels, which are arranged to group together
sets of the components used in the window (frame). The default layout manager of a JFrame is
the BorderLayout. A JFrame has a couple of unique and important methods that are worth
pointing out:

void getContentPane().add(Component c) -- adds a component to the frame. Note that


a JFrame acts slightly differently than a JPanel here because JFrames have a little-used feature of
multiple layers (panes) of components that can be quickly switched in and out of visibility. There
are overridden forms of this method inherited from java.awt.Container that allow parameters for
the layout manager to be passed along, such as specifying the component's position in
aBorderLayout.void setDefaultCloseOperation(int option) -- sets the behavior of the frame when
it is closed. See the web page on Setting the Behavior When Closing a JFrame.

javax.swing.JApplet -- Allows a Java program to be run as a component in a web page. Note that
an applet and a frame are not the same thing and are not interchangeable, though there are some
work-arounds for that which allow the same code to run as either a stand-alone application or an
applet in a web page.

javax.swing.JPanel -- The basic building block for laying components out in a frame or inside of
other panels. A JAva GUI consists of a frame with panels holding panels holding panels,
etc. Note that "panels" here could also be scroll panes, split panes and/or tabbed panes (see
below). The default layout manager for a JPanel is the FlowLayout.

javax.swing.JScrollPane -- Allows you to display a single panel with scroll bars on the sides,
allowing more or larger components to be displayed than will fit on the screen.
javax.swing.JSplitPane -- Allows two panels to be displayed with either a vertical or horizonatal,
user-moveable bar separating them.javax.swing.JTabbedPane -- Allows multiple panels to be
displayed in a "tabbed" format.

Commonly Used Methods in GUI Containers

void add(Component c) -- adds another component to the container to be laid out as per the
currently installed layout manager. There are overridden forms of this method inherited
from java.awt.Container that allow parameters for the layout manager to be passed along, such as
specifying the component's position in aBorderLayout.

void setLayout(LayoutManager lm) -- installs a new layout manager into the container.

Commonly Used Methods in All GUI Components

void setPreferredSize(int width, int height) -- sets the size of a component to be used when the
layout manager is able to use that size, e.g. there is enough room. Some layout managers always
ignore the size setting of a component because the size is under other constraints..

String getText(), void setText(String s) -- accessor methods for the text of labels, buttons, text
fields and text areas.

void setBackground(Color c) -- sets the background color of a component.

Utility Classes

java.awt.Graphics --This abstract class is rarely instantiated by the developer's code. A machine-
dependent instance of this class is handed to the paintComponent method of a visible GUI
component during the screen painting process -- it is NOT instantiated by the developer's code but
rather by the Java GUI sub-system. The developer can writed code that will use that
supplied Graphicsobject instance to draw lines, shapes and images onto the screen. For advanced
graphics work, it should be noted that the supplied Graphics object can always be safely downcast
to the more capablejava.awt.Graphcs2D class.

java.awt.Color -- Represents a color. Has static fields predefined to common colors plus can be
expressed in a number of different formats, such as 3-bit RGB values.java.awt.Point -- Represents
an point on 2-dimensional plane as specified byinteger-valued Cartesian coordinates.. Has fields
to retrieve the x and ycoordinates plus methods for operations such as calculating the distance
between two points. For floating point-valuedCartesian coordinates, use
thejava.awt.geom.Point2D class.

One of the big advances that Java made when it was introduced in 1995 was the inclusion of
standardized "graphical user interface" ("GUI") libraries. This was a tremendous leap forward
over the bewildering array of incompatible third-party libraries that were the only avenues
previously open to GUI developers. The Java GUI library was also one of the first major software
packages to explicitly describe its architecture in terms of the then-brand-new language of Design
Patterns.

Main Packages

One confusing aspect of the Java GUI system however is a legacy issue where the system
underwent a large-scale upgrade in 1997, so some of the classes involved are spread over the
(relatively) older java.awt packages and the newer javax.swing packages. In general, if the class
name starts with "J", then it is in the Swing package. Since some functionality appears to be
duplicated in the Swing packages, such as frames and buttons, always use the Swing component
over the older AWT components when there is a choice.

java.awt -- Contains the main superclasses for the GUI components plus a number of utility type
classes, such as Color and Point.java.awt.event -- Contains the classes and interfaces for managing
events from the GUI components, e.g. button clicks and mouse movements.javax.swing --
Contains most of the visible GUI components that are used such as buttons, text fields, frames and
panels.
The Java GUI Subsystem

The Java GUI subsystem consists of a separate, automous task execution thread called the "event
loop". Every action that affects the GUI, e.g. calls to repaint the screen or to manipulate the
properties of a GUI component, or is a result of something happening to the GUI, e.g. the user
clicks the mouse or hits a key, is encapsulated in the form of an "event" that is placed into a queue
for the event loop to process. The result of processing an event may be a manipulation of the bits
of color on the screen or it may result in calls to methods in the developer's code.

If we look at the process to handle the clicking of a button, what we see is that the user's mouse
click sets off a chain of events. The button object responds to the mouse click by creating a button
click event that is placed into the event queue. The event loop, when it is free to do so, picks up
that event and processes it. The processing of a button click event involves calling methods on
specially registered objects called "listeners" who are "listening" for the click event. The listeners
for a button click are objects implementing the java.awt.ActionListener interface and the button
click event processing involves calling the listener's actionPerformedmethod, which the developer
has implemented to do whatever is needed when that particular button is clicked. Note that
multiple listeners may be "added" to any given button and the button click processing will call
each ActionListener's actionPerformed method in turn.

In the other direction, if we look at the painting process, supposed the developer's code wishes to
call repaint a frame component on the screen. The developer's code will call the repaint() method
of the frame, but all that does is to generate a repaint event that is placed into the event queue along
with all the other events. When the event loop is able, it processes that repaint event and in doing
so, the GUI subsystem will generate a specialjava.awt.Graphics instance that is used to represent
the physical screen of the computer. This Graphics object is passed as an input parameter to a call
to the paintComponent method of the frame. (Technically, the system calls the
frame's paint() method which in turn callspaintComponent(), but we don't need to worry about
that.) Since the frame is a container, it as any good Composite Design pattern implementation
will do, in turn calls the paintComponent method of all of its sub-components. If one of those
components is itself a container, then the painting process cascades down the composite tree until
every component has had a chance to paint itself upon the screen (the Graphics object). The
developer can insert custom painting operations by simply overriding the paintComponent method
of the desired component.

Commonly Used ClassesSimple Components

javax.swing.JLabel -- A piece of non-editable text on the screen.

javax.swing.JButton -- A button that can be clicked. Clicking the button will cause
its actionPerformed event to be fired which will call all
installed ActionListener's actionPerformedmethods.

javax.swing.JTextField -- A single line of user-editable text.

javax.swing.JTextArea -- A box with multiple lines of text displayed. Can be set for editable or
non-editable.

javax.swing.JRadioButton, javax.swing.JCheckBox -- Small round or square boxes that can be


clicked on to indicate the selection of something, such as an option of some sort. Clicking the
radio button or check box will fire a particular type of event. Radio buttons can be grouped
together using an invisible (to the user) class called javax.swing.ButtonGroup to create a set where
only one button can be set at a time.

javax.swing.JComboBox -- A drop-list of items. A JComboBox holds a set of Objects, not


just Strings. The displayed texts are the return values of the item's toString() method. Thus
a JComboBox can be used to hold arbitrary entities without the GUI knowing what those entities
are. Events are fired only when the selected item changes, though the currently selected item and
its index can always be retrieved.
Container Components

javax.swing.JFrame -- a stand-alone "window" or "frame" with a title and the usual abilities to be
moved, resized, minimized, maximized and closed. For most people, this is the top-level
container in their system. Thus a JFrame cannot hold another JFrame. While a JFramecan hold
any type of component, typically, a JFrame holds JPanels, which are arranged to group together
sets of the components used in the window (frame). The default layout manager of a JFrame is
the BorderLayout. A JFrame has a couple of unique and important methods that are worth
pointing out:

void getContentPane().add(Component c) -- adds a component to the frame. Note that


a JFrame acts slightly differently than a JPanel here because JFrames have a little-used feature of
multiple layers (panes) of components that can be quickly switched in and out of visibility. There
are overridden forms of this method inherited from java.awt.Container that allow parameters for
the layout manager to be passed along, such as specifying the component's position in
aBorderLayout.void setDefaultCloseOperation(int option) -- sets the behavior of the frame when
it is closed. See the web page on Setting the Behavior When Closing a JFrame.

javax.swing.JApplet -- Allows a Java program to be run as a component in a web page. Note that
an applet and a frame are not the same thing and are not interchangeable, though there are some
work-arounds for that which allow the same code to run as either a stand-alone application or an
applet in a web page.

javax.swing.JPanel -- The basic building block for laying components out in a frame or inside of
other panels. A JAva GUI consists of a frame with panels holding panels holding panels,
etc. Note that "panels" here could also be scroll panes, split panes and/or tabbed panes (see
below). The default layout manager for a JPanel is the FlowLayout.
javax.swing.JScrollPane -- Allows you to display a single panel with scroll bars on the sides,
allowing more or larger components to be displayed than will fit on the screen.

javax.swing.JSplitPane -- Allows two panels to be displayed with either a vertical or horizonatal,


user-moveable bar separating them.

javax.swing.JTabbedPane -- Allows multiple panels to be displayed in a "tabbed" format.

Commonly Used Methods in GUI Containers

void add(Component c) -- adds another component to the container to be laid out as per the
currently installed layout manager. There are overridden forms of this method inherited
from java.awt.Container that allow parameters for the layout manager to be passed along, such as
specifying the component's position in aBorderLayout.

void setLayout(LayoutManager lm) -- installs a new layout manager into the container.

Commonly Used Methods in All GUI Components

void setPreferredSize(int width, int height) -- sets the size of a component to be used when the
layout manager is able to use that size, e.g. there is enough room. Some layout managers always
ignore the size setting of a component because the size is under other constraints..

String getText(), void setText(String s) -- accessor methods for the text of labels, buttons, text
fields and text areas.

void setBackground(Color c) -- sets the background color of a component.


Utility Classes

java.awt.Graphics --This abstract class is rarely instantiated by the developer's code. A machine-
dependent instance of this class is handed to the paintComponent method of a visible GUI
component during the screen painting process -- it is NOT instantiated by the developer's code but
rather by the Java GUI sub-system. The developer can writed code that will use that
supplied Graphicsobject instance to draw lines, shapes and images onto the screen. For advanced
graphics work, it should be noted that the supplied Graphics object can always be safely downcast
to the more capablejava.awt.Graphcs2D class.

java.awt.Color -- Represents a color. Has static fields predefined to common colors plus can be
expressed in a number of different formats, such as 3-bit RGB values.

java.awt.Point -- Represents an point on 2-dimensional plane as specified byinteger-


valued Cartesian coordinates.. Has fields to retrieve the x and ycoordinates plus methods for
operations such as calculating the distance between two points. For floating point-
valuedCartesian coordinates, use thejava.awt.geom.Point2D class.

You might also like