ASSIGMENT Programming 2
ASSIGMENT Programming 2
Department of Computing
Module: COM222
Review Date:
Verified by:
To be completed by student:
Grade / Mark
(Indicative: may change when
moderated)
If Mitigating Circumstances are being claimed then please indicate your Code
Number: ............................................
1
INDEX
TASK 1.1 4
What is a Constructor?------------------------------------------------------- 4
What is an accessor?---------------------------------------------------------- 6
What is a Transformers?----------------------------------------------------- 7
8
TASK 1.2
What is an Static variable?--------------------------------------------------- 8
Examples:----------------------------------------------------------------------- 8
TASK 1.3 11
TASK 2 12
Class Hour---------------------------------------------------------------------- 13
Class Vector-------------------------------------------------------------------- 14
Star………..……………………………………………………….. 15
2
Take out first position-------------------------------------------------------------------- 16
Class Person-------------------------------------------------------------------- 22
Class Vector-------------------------------------------------------------------- 23
Class Date----------------------------------------------------------------------- 24
Class Hour---------------------------------------------------------------------- 25
Class Main2-------------------------------------------------------------------------------- 26
Class Jinsertar---------------------------------------------------------- 32
Class Jmostrar------------------------------------------------------------------ 37
3
Task 1.1
What is a Constructor?_______________________
The constructor for a class is a standard method to initialize the objects in that class. It is
invoked automatically when new create an object of that class.
Ref: http://java.sun.com/j2se/1.4.2/docs/api/java/
class A {
int x, y;
A() { x=0; y=0; } // constructor
...
}
A a= new A();
a.Print(); // 0 0
The constructor can have parameters. In this case, the respective arguments must be
placed on having created the object:
class A {
int x, y;
A(int ix, int iy)
{ x=ix; y=iy; } // constructor
...
}
A a= new A(1,2);
4
a.Print(); // 1 2
Several constructors can place. During the creation of an object, there is invoked that
one that wears shoes with the given arguments:
class A {
int x, y;
A() { x=0; y= 0; }
A(int ix, int iy)
{ x=ix; y=iy; }
A(A from)
{ x= from.x; y= from.y; }
...
}
public person()
{
this.Name="";
this.Date="";
this.Time="";
}
public Date(){
Calendar hoy = Calendar.getInstance();
this.day = hoy.get(Calendar.DAY_OF_MONTH);
this.month = hoy.get(Calendar.MONTH)+1;
this.year = hoy.get(Calendar.YEAR);
}
5
public Hour(){
Calendar hoy = Calendar.getInstance();
this.hour = hoy.get(Calendar.HOUR_OF_DAY);
this.minutes = hoy.get(Calendar.MINUTE);
this.seconds = hoy.get(Calendar.SECOND);
}
public vector()
{
this.vpersonas=new Vector(8);
}
What is an Accessor?__________________________
The accessor is a method that we use to return information about the state of an object.
Is a method that accesses in the object attributes and return the result of those attributes.
Ref: http://java.sun.com/j2se/1.4.2/docs/api/java/
6
public String getHour(){return this.hourEnCadena=hourEnCadena.valueOf(hour);}
What is a Transformer?__________________________
The transformers are methods that are used to alter the state of an object giving value to
the attributes. The transformers return nothing. We have used the second constructor of
the class person which creates an object with the values blank "new person ()" so we
need some methods to give value to the attributes of the new object.
Ref: http://java.sun.com/j2se/1.4.2/docs/api/java/
7
Task 1.2
A class can have own variables of the class and not of every object. To these variables
there is called them variables of class or changeable static. Static they are in the habit of
the variables using to define common constants for all the objects of the class. The
variables member static believe themselves in the moment in which they can be
necessary: when the first object of the class is going to be created, in all that it calls to a
method static or in all that a variable is in use static of the above mentioned class. The
important thing is that the variables member static initialize always before that any
object of the class.
Ref: http://www.usuario.com/informacion/Java_TXT/JAVA-25.html
For example :
class Main.2
{
static int zero = 0;
}
One already declared the static variable, in all the places where there are 0, it is
necessary to put the constant "zero".
aux = vpersonas.getsize();
if (aux>zero)
{
persona = vpersonas.deletePerson();
JOptionPane.showMessageDialog(this,"Se ha eliminado la posicion 0 de la
cola correctamente","MENSAJE",JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(this,"La cola esta vacia no se puede
eliminar a nadie","MENSAJE",JOptionPane.INFORMATION_MESSAGE);
}
8
}
if (!nombre.equals(""))
{
aux = vpersonas.getsize();
opcion= Integer.parseInt(jTextField1.getText());
if (aux == zero)
{
JOptionPane.showMessageDialog(this,"The queue is empty, it is
impossible to erase anybody","MENSAJE",JOptionPane.WARNING_MESSAGE);
}
else
{
if (opcion < aux)
{
persona = vpersonas.deletePersonAt(opcion);
opcion = opcion + 1;
JOptionPane.showMessageDialog(this,"It has been erased
correctly","ERROR",JOptionPane.WARNING_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(this,"There aren’t anybody in
this position","MENSAJE",JOptionPane.WARNING_MESSAGE);
}
}
}
else
{
JOptionPane.showMessageDialog(this,"Introduce one number from 0 to
7","ERROR",JOptionPane.WARNING_MESSAGE);
9
}
}
}
}
10
Task 1.3
Diagram of a class:
Class Person:
constructor person()
person(strin,string,string9
accessor getname
getdate
gettime Methods
setname
transformers setdate
settime
In this class, class person, we can find 3 parts, the name of the class, whom is person,
the differents attributes, which are name, date and time, and then, we can see the three
diferents Methosd: Constructor , it will be person(), (always with the same name of the
class) Accessor, that returns the variable values of one object (getnama, getdate gettime)
and transformers, that his function is change the variables, (setname, setdate, settime).
11
Task 2
The Objetive of the practice is to develop a kind of notebook, in which there exists a
queue of client or users, which could be added to the queue and erase of the queue, for it
we need that the queue is of type FIFO, in addition it is necessary that it appears the
date and the hour of every client when he enters the queue. For it I have created the
Class Person, that it has of attributes, name dates and hour; the Class Vector, that this
limited to 8 clients, and in that they guard by means of FIFO, the clients' queue. In
addition I have the Class Dates and the Class Hour, that both depend on the Class
Calendar, to show the hour and the date of entry of the client in the tail. There are 3
classes more, the Class Main2, and other two Classes for the graphical part of the
practice.
The Main2 class, it consists in his totality of the graphical part of the practice, Where
you can insert the clients in the queue, see the position of every client, eliminate the first
client of the queue, and eliminate a client of a certain position of the queue.
In turn certainly, the principal class calls to the class Jinsertar that it inserts clients, and
Jmostrar, which show clients. This classes are make with netbeans program, and their
code is complicated, because them have buttons and panels with a several lines of code
but these code is always generate from java with netbeans.
JInsertar
Main2 principal
vpersonas
vpersonas
zero jInsertar(jframe,vector)
jButton1ActionPerformed()
jButton2ActionPerformed()
formwindowclosed()
Main2()
Jmostrar
jButton1ActionPerformed() Principal
jButton2ActionPerformed() vpersonas
jButton3ActionPerformed()
jButton4ActionPerformed()
jButton5ActionPerformed() Jmostrar(jframe,vector)
formwindowclosed() jButton2ActionPerformed()
formwindowclosed()
12
Class Date
In the class Date, we have the attributes year, month and day, but this class, there
depends directly on a class imported of java, that is the class calendar. So much in the
class it dates as like in the class hour in the builder the first line creates an object of type
calendar in case of the date today, in case of hour today also, and in this object already a
few attributes exist so called minute, second, year, month…etc
The class calendar creates an object with the day month year, hour the second minute,
and today is an object of type calendar, that is it who contains all the attributes.
Date
day
month
year Calendar
Class import java
person() Util java
setDay()
setMonth() import java.io.*;
setyear() import java.util.*;
getDay()
setMonth()
getYear()
Class Hour
This class is the same that Date class, it depends first from the Calendar class, because
to the constructor, does not pass parameter to him beacuse he accedes to the class
Calendar. His attributes are Hour Minute and Seconds. And then it has his Methods.
The Class Hour and the Class Date could be together, but is more easy to see the
concept if they are separated.
Hour
_____________________
Hour()
Minute() Calendar
Second() Class import java
____________________ Util java.
getHour()
setHour() import java.io.*;
getMinute() import java.util.*;
setMinute()
getSecond()
setSecond()
13
Class Vector
In the Class Vector, we have only one attribute, Vpersonas, Its will be the vector that
we will use to introduce in the queue clients, with a limit for 8 clients. In this vector, Its
possible to add a client, erase a client, and erase one client with a previously position.
Vector
_____________________
vpersonas
_____________________
vector()
getObject()
Class Hour
addElement()
deletePerson()
deletePersonAt()
getmax()
getsize()
14
User's manual of the graphical part
Start:
Since we can observe, on having executed the program in java, the graphical part, it
shows us a menu.
In the menu, several options appear for the user, among them there are:
exit
fig nº 1
15
Insert of the queue:
We choose insert of the queue, then another window appears, indicating the name of the
person to us to add in the queue, and the hour, in hours, minutes and seconds, and the
date in day, month and year of when we introduce him in the queue.
fig 02.
16
We can write the name of the client to add to the queue and next press the button insert,
and the next message appears on the screen:
fig 03
When we press the Accept Button, we can add another client on the queue, or we can
return to the previously screen and select another option from the menu.
When we had introduce 8 clients in the queue, (limit is 8 clients) appears the next
message on the screen: (see fig 04).
17
fig 04
Now, we can’t introduce more clients in the queue, so we must to press accept and then
return to choose another option from the menu.
If we have chosen the option 2, take out the first position, the program will erase the
client who was in the initial position, the first introduced client. And it was displacing a
position towards the left side to the rest of clients who exist in the queue. passing the
client number 2 to being the number 1 in the queue.
18
fig 05
At any time we can choose the option 4. Show all queue to see the state of the clients'
queue. We will be able to observe the clients who exist, and the hour and the date of
when they were introduced.
19
Take out the position (0-7):
Choosing this option of the menu, we eliminate the client of the queue who occupies the
position X that the user must introduce.
fig 07
If the user introduces a position that does not exist or that not occupied this one, and if
the queue is empty, on the screen will appears the followings messages.
20
fig 08
fig 09
21
Java code in classes
Class person
22
public String getTime()
{ return this.Time; }
}
Class vector
import java.util.Vector;
public vector()
{
this.vpersonas=new Vector(8);
}
23
if (n<8)
{
return true;
}
else
{
return false;
}
}
Class Date
// Methods
/**Method which returns the day in string format*/
public String getDay(){return this.dayEnCadena=dayEnCadena.valueOf(day);}
24
case 1: monthEnCadena = "January";break;
case 2: monthEnCadena = "Febrary";break;
case 3: monthEnCadena = "March";break;
case 4: monthEnCadena = "April"; break;
case 5: monthEnCadena = "May"; break;
case 6: monthEnCadena = "Juny"; break;
case 7: monthEnCadena = "July";break;
case 8: monthEnCadena = "Augost";break;
case 9: monthEnCadena = "September";break;
case 10: monthEnCadena = "October";break;
case 11: monthEnCadena = "November";break;
case 12: monthEnCadena = "Dicember";break;
}
return monthEnCadena;
}
Class Hour
25
public String getHour(){return this.hourEnCadena=hourEnCadena.valueOf(hour);}
Class Main2
26
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("APLICACION JAVA");
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosed(java.awt.event.WindowEvent evt) {
formWindowClosed(evt);
}
});
jButton5.setText("EXIT ");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
27
javax.swing.GroupLayout jPanel1Layout = new
javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(143, 143, 143)
.addComponent(jLabel1))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(224, 224, 224)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayou
t.Alignment.LEADING, false)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.R
ELATED)
.addComponent(jTextField1, 0, 10, Short.MAX_VALUE))
.addComponent(jButton2,
javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton4,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton5,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap(168, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(49, 49, 49)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(34, 34, 34)
.addComponent(jButton1)
.addGap(17, 17, 17)
.addComponent(jButton2)
.addGap(16, 16, 16)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.BASELINE)
.addComponent(jButton3)
28
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 22,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(19, 19, 19)
.addComponent(jButton4)
.addGap(18, 18, 18)
.addComponent(jButton5)
.addContainerGap(123, Short.MAX_VALUE))
);
29
if (!name.equals(""))
{
aux = vpersonas.getsize();
opcion= Integer.parseInt(jTextField1.getText());
if (aux == cero)
{
JOptionPane.showMessageDialog(this,"The queue is empty, impossible to
erase anybody","MENSAJE",JOptionPane.WARNING_MESSAGE);
}
else
{
if (opcion < aux)
{
persona = vpersonas.deletePersonAt(opcion);
opcion = opcion + 1;
JOptionPane.showMessageDialog(this,"Erase
correctly","ERROR",JOptionPane.WARNING_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(this,"There isnt anybody in this
position","MENSAJE",JOptionPane.WARNING_MESSAGE);
}
}
}
else
{
JOptionPane.showMessageDialog(this,"Introduzca un número del 0 al
7","ERROR",JOptionPane.WARNING_MESSAGE);
}
}//GEN-LAST:event_jButton3ActionPerformed
aux = vpersonas.getsize();
if (aux>cero)
{
persona = vpersonas.deletePerson();
JOptionPane.showMessageDialog(this,"The position 0 has been erased
correctly from the queue","MENSAJE",JOptionPane.INFORMATION_MESSAGE);
}
else
{
30
JOptionPane.showMessageDialog(this,"The queue is empty, its
impossible to erase
anybody","MENSAJE",JOptionPane.INFORMATION_MESSAGE);
}
}//GEN-LAST:event_jButton2ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
Main2 panelPrincipal= new Main2();
panelPrincipal.setVisible(true);
}
});
}
Class Jinsertar
31
private JFrame principal;
private vector vpersonas;
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosed(java.awt.event.WindowEvent evt) {
formWindowClosed(evt);
}
});
32
});
jButton2.setText("RETURN");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jLabel2.setText("NAME");
jLabel3.setText("DATE");
jLabel4.setText("HOUR");
jTextField2.setEditable(false);
jTextField3.setEditable(false);
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(143, 143, 143)
.addComponent(jLabel1))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(119, 119, 119)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 200,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELA
TED)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 200,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(175, 175, 175)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayou
t.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel1Layout.createSequentialGroup()
33
.addComponent(jLabel4,
javax.swing.GroupLayout.PREFERRED_SIZE, 160,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.R
ELATED)
.addComponent(jTextField3,
javax.swing.GroupLayout.PREFERRED_SIZE, 160,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupL
ayout.Alignment.LEADING)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 160,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 160,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.R
ELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupL
ayout.Alignment.LEADING, false)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 160,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE))))))
.addContainerGap(175, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(49, 49, 49)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.BASELINE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
30, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1,
javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.BASELINE)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE,
30, javax.swing.GroupLayout.PREFERRED_SIZE)
34
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.LEADING)
.addComponent(jTextField3,
javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE,
30, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
, 83, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.BASELINE)
.addComponent(jButton1)
.addComponent(jButton2))
.addGap(96, 96, 96))
);
name = jTextField1.getText();
35
date = jTextField2.getText();
hour = jTextField3.getText();
if (!name.equals("")){
if(vpersonas.getmax()==true)
{
name = jTextField1.getText();
date = jTextField2.getText();
hour = jTextField3.getText();
persona = new person(name,date,hour);
vpersonas.addElement(persona);
JOptionPane.showMessageDialog(this,"The name has been introduced in
the queue correctly","MENSAJE",JOptionPane.INFORMATION_MESSAGE);
}
else
{
JOptionPane.showMessageDialog(this,"The queue is
full","MENSAJE",JOptionPane.INFORMATION_MESSAGE);
}
}
else {JOptionPane.showMessageDialog(this,"Introduce one name
please","MENSAJE",JOptionPane.WARNING_MESSAGE);}
}//GEN-LAST:event_jButton1ActionPerformed
36
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
// End of variables declaration//GEN-END:variables
Class Jmostrar
37
private void initComponents() {
javax.swing.JButton jButton2;
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosed(java.awt.event.WindowEvent evt) {
formWindowClosed(evt);
}
});
jButton2.setText("VOLVER");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(227, Short.MAX_VALUE)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
200, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(347, 347, 347))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(143, 143, 143)
38
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Ali
gnment.LEADING)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE,
400, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(231, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(49, 49, 49)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(6, 6, 6)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
39
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED
)
.addComponent(jLabel9)
.addGap(60, 60, 60)
.addComponent(jButton2)
.addContainerGap(119, Short.MAX_VALUE))
);
40
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
http://java.sun.com/j2se/1.4.2/docs/api/java/
http://www.usuario.com/informacion/Java_TXT/JAVA-25.html
41
http://www.osmosislatina.com/lenguajes/uml/clasesob.htm
http://www.netbeans.org/
for get and manage the program to create the java code and the graphical interface.
42