0% found this document useful (0 votes)
24 views

Codes

Uploaded by

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

Codes

Uploaded by

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

HOME.

java

package CCNCSCV.to.PPS;

import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import org.jfree.chart.ChartRenderingInfo;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.entity.StandardEntityCollection;

/**
*
* @author temblor
*/
public class HOME extends javax.swing.JFrame {

public HOME() {

setResizable(false);
initComponents();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

menuBar = new javax.swing.JMenuBar();


fileMenu = new javax.swing.JMenu();
exitMenuItem = new javax.swing.JMenuItem();
helpMenu = new javax.swing.JMenu();
exitMenuItem1 = new javax.swing.JMenuItem();
exitMenuItem2 = new javax.swing.JMenuItem();
jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
panel2 = new java.awt.Panel();
label2 = new java.awt.Label();
label3 = new java.awt.Label();
label4 = new java.awt.Label();
jLabel1 = new javax.swing.JLabel();
label1 = new java.awt.Label();
jLabel2 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
menu1 = new javax.swing.JButton();
menu2 = new javax.swing.JButton();
jSeparator2 = new javax.swing.JSeparator();
jSeparator3 = new javax.swing.JSeparator();
label5 = new java.awt.Label();
jSeparator4 = new javax.swing.JSeparator();
menuBar1 = new javax.swing.JMenuBar();
helpMenu1 = new javax.swing.JMenu();
exitMenuItem4 = new javax.swing.JMenuItem();
helpMenu4 = new javax.swing.JMenu();

1
helpMenu5 = new javax.swing.JMenu();
exitMenuItem8 = new javax.swing.JMenuItem();
exitMenuItem9 = new javax.swing.JMenuItem();
fileMenu2 = new javax.swing.JMenu();
exitMenuItem6 = new javax.swing.JMenuItem();
helpMenu2 = new javax.swing.JMenu();
exitMenuItem5 = new javax.swing.JMenuItem();

menuBar.setBackground(new java.awt.Color(44, 50, 56));

menuBar.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERE
D, null, new java.awt.Color(28, 139, 222), new java.awt.Color(50, 190, 215), null));
menuBar.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
menuBarAncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
});

fileMenu.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
fileMenu.setForeground(new java.awt.Color(15, 225, 222));
fileMenu.setText("File");
fileMenu.setFont(new java.awt.Font("Gentium", 1, 16)); // NOI18N
fileMenu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
fileMenuActionPerformed(evt);
}
});

exitMenuItem.setFont(new java.awt.Font("Gentium", 1, 16)); // NOI18N


exitMenuItem.setForeground(new java.awt.Color(13, 246, 249));
exitMenuItem.setText("Exit");
exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItemActionPerformed(evt);
}
});
fileMenu.add(exitMenuItem);

menuBar.add(fileMenu);

helpMenu.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
helpMenu.setForeground(new java.awt.Color(149, 237, 231));
helpMenu.setText("Help");
helpMenu.setFont(new java.awt.Font("Gentium", 1, 16)); // NOI18N

exitMenuItem1.setFont(new java.awt.Font("Gentium", 1, 16)); // NOI18N


exitMenuItem1.setForeground(new java.awt.Color(13, 246, 249));
exitMenuItem1.setText("The System");
exitMenuItem1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem1ActionPerformed(evt);
}

2
});
helpMenu.add(exitMenuItem1);

exitMenuItem2.setFont(new java.awt.Font("Gentium", 1, 16)); // NOI18N


exitMenuItem2.setForeground(new java.awt.Color(13, 246, 249));
exitMenuItem2.setText("User Manual");
exitMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem2ActionPerformed(evt);
}
});
helpMenu.add(exitMenuItem2);

menuBar.add(helpMenu);

jCheckBoxMenuItem1.setSelected(true);
jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

panel2.setBackground(new java.awt.Color(185, 195, 216));

label2.setAlignment(java.awt.Label.CENTER);
label2.setBackground(new java.awt.Color(185, 195, 216));
label2.setFont(new java.awt.Font("Bitstream Charter", 1, 20)); // NOI18N
label2.setForeground(new java.awt.Color(13, 18, 33));
label2.setText("Maxino College AND Cloud Computing Network for Climate Studies in Central
Visayas");

label3.setAlignment(java.awt.Label.CENTER);
label3.setFont(new java.awt.Font("DejaVu Sans Mono", 3, 15)); // NOI18N
label3.setForeground(java.awt.Color.black);
label3.setText("Maxino College sees herself as the Community of caring scholars, inspired by the Roman
Catholic faith\n");

label4.setAlignment(java.awt.Label.CENTER);
label4.setFont(new java.awt.Font("DejaVu Sans Mono", 3, 15)); // NOI18N
label4.setForeground(java.awt.Color.black);
label4.setText(" in the service of people. ");

jLabel1.setIcon(new javax.swing.ImageIcon("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/
src/CCNCSCV/to/PPS/gfg.png")); // NOI18N
jLabel1.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(153,
114, 222), new java.awt.Color(18, 243, 224), new java.awt.Color(32, 208, 233), new java.awt.Color(186, 98,
230)));
jLabel1.setPreferredSize(new java.awt.Dimension(369, 186));

label1.setFont(new java.awt.Font("Bitstream Charter", 3, 20)); // NOI18N


label1.setForeground(new java.awt.Color(43, 12, 12));
label1.setText("AND");

jLabel2.setIcon(new javax.swing.ImageIcon("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/
src/CCNCSCV/to/PPS/dgdfg.png")); // NOI18N
jLabel2.setBorder(new
javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED, new java.awt.Color(153,
114, 222), new java.awt.Color(18, 243, 224), new java.awt.Color(32, 208, 233), new java.awt.Color(186, 98,
230)));
jLabel2.setPreferredSize(new java.awt.Dimension(369, 186));

jSeparator1.setForeground(java.awt.Color.white);
jSeparator1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 1, true));

menu1.setBackground(new java.awt.Color(195, 202, 214));


menu1.setFont(new java.awt.Font("Bitstream Charter", 1, 18)); // NOI18N
menu1.setForeground(java.awt.Color.black);
menu1.setText("Existing Bohol Sites");
menu1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
menu1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menu1ActionPerformed(evt);
}
});

menu2.setBackground(new java.awt.Color(195, 202, 214));


menu2.setFont(new java.awt.Font("Bitstream Charter", 1, 18)); // NOI18N
menu2.setForeground(java.awt.Color.black);
menu2.setText("Data Entry");
menu2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
menu2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menu2ActionPerformed(evt);
}
});

jSeparator2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 1, true));

jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);
jSeparator3.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 1, true));

label5.setAlignment(java.awt.Label.CENTER);
label5.setFont(new java.awt.Font("DejaVu Serif", 1, 20)); // NOI18N
label5.setForeground(java.awt.Color.darkGray);
label5.setText("RAINFALL PATTERNS IN SELECTED AREAS OF BOHOL\n");

jSeparator4.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.white));

javax.swing.GroupLayout panel2Layout = new javax.swing.GroupLayout(panel2);


panel2.setLayout(panel2Layout);
panel2Layout.setHorizontalGroup(
panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label2, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 1104, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
.addContainerGap(328, Short.MAX_VALUE)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
panel2Layout.createSequentialGroup()
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(421, 421, 421))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,

4
panel2Layout.createSequentialGroup()
.addComponent(menu1, javax.swing.GroupLayout.PREFERRED_SIZE, 212,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(12, 12, 12)
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 5,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(menu2, javax.swing.GroupLayout.PREFERRED_SIZE, 201,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(334, 334, 334))))
.addGroup(panel2Layout.createSequentialGroup()
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGap(331, 331, 331)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 170,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(31, 31, 31)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 168,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panel2Layout.createSequentialGroup()
.addGap(83, 83, 83)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panel2Layout.createSequentialGroup()
.addGap(68, 68, 68)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 936,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panel2Layout.createSequentialGroup()
.addGap(273, 273, 273)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 555,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(panel2Layout.createSequentialGroup()
.addGap(173, 173, 173)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(235, 235, 235))
.addGroup(panel2Layout.createSequentialGroup()
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 741,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))))
);
panel2Layout.setVerticalGroup(
panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
.addGap(37, 37, 37)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 42,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGap(35, 35, 35)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 171,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 172,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE))
.addGroup(panel2Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(94, 94, 94)))
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(30, 30, 30)
.addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(77, 77, 77)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(menu1, javax.swing.GroupLayout.PREFERRED_SIZE, 44,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(menu2, javax.swing.GroupLayout.PREFERRED_SIZE, 45,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(22, 22, 22))
);

menuBar1.setBackground(java.awt.Color.white);
menuBar1.setBorder(null);
menuBar1.setForeground(java.awt.Color.black);
menuBar1.setMargin(new java.awt.Insets(2, 2, 2, 2));
menuBar1.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
menuBar1AncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
});

6
helpMenu1.setForeground(new java.awt.Color(85, 80, 130));
helpMenu1.setText("The System");
helpMenu1.setAlignmentX(0.8F);
helpMenu1.setAlignmentY(0.8F);
helpMenu1.setAutoscrolls(true);
helpMenu1.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N

exitMenuItem4.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N


exitMenuItem4.setForeground(java.awt.Color.black);
exitMenuItem4.setText("Capabilities");
exitMenuItem4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem4ActionPerformed(evt);
}
});
helpMenu1.add(exitMenuItem4);

menuBar1.add(helpMenu1);

helpMenu4.setForeground(new java.awt.Color(113, 139, 159));


helpMenu4.setText("The School");
helpMenu4.setAlignmentX(0.8F);
helpMenu4.setAlignmentY(0.8F);
helpMenu4.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N

helpMenu5.setForeground(java.awt.Color.darkGray);
helpMenu5.setText("Maxino College");
helpMenu5.setAlignmentX(0.7F);
helpMenu5.setAlignmentY(0.7F);
helpMenu5.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N

exitMenuItem8.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N


exitMenuItem8.setForeground(java.awt.Color.black);
exitMenuItem8.setText("Mission");
exitMenuItem8.setBorder(null);
exitMenuItem8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem8ActionPerformed(evt);
}
});
helpMenu5.add(exitMenuItem8);

exitMenuItem9.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N


exitMenuItem9.setForeground(java.awt.Color.black);
exitMenuItem9.setText("Vision");
exitMenuItem9.setBorder(null);
exitMenuItem9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem9ActionPerformed(evt);
}
});
helpMenu5.add(exitMenuItem9);

helpMenu4.add(helpMenu5);

menuBar1.add(helpMenu4);
fileMenu2.setForeground(new java.awt.Color(145, 93, 93));
fileMenu2.setText("User Manual");
fileMenu2.setAlignmentX(0.8F);
fileMenu2.setAlignmentY(0.8F);
fileMenu2.setAutoscrolls(true);
fileMenu2.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N
fileMenu2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
fileMenu2ActionPerformed(evt);
}
});

exitMenuItem6.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N


exitMenuItem6.setForeground(java.awt.Color.black);
exitMenuItem6.setText("Guide");
exitMenuItem6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem6ActionPerformed(evt);
}
});
fileMenu2.add(exitMenuItem6);

menuBar1.add(fileMenu2);

helpMenu2.setForeground(new java.awt.Color(85, 80, 130));


helpMenu2.setText("Bohol Map");
helpMenu2.setAlignmentX(0.8F);
helpMenu2.setAlignmentY(0.8F);
helpMenu2.setAutoscrolls(true);
helpMenu2.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N

exitMenuItem5.setFont(new java.awt.Font("Bitstream Charter", 1, 16)); // NOI18N


exitMenuItem5.setForeground(java.awt.Color.black);
exitMenuItem5.setText("LOCATION");
exitMenuItem5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItem5ActionPerformed(evt);
}
});
helpMenu2.add(exitMenuItem5);

menuBar1.add(helpMenu2);

setJMenuBar(menuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel2, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

8
.addComponent(panel2, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItemActionPerformed
System.exit(0);
}//GEN-LAST:event_exitMenuItemActionPerformed

private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_fileMenuActionPerformed
// TODO add your handling code here:
JFreeChart chart = null;

try{
final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
final File file1 = new File("Chart.png");
ChartUtilities.saveChartAsPNG(file1, chart, 600, 400,info);

}
catch(Exception e){

}
}//GEN-LAST:event_fileMenuActionPerformed

private void exitMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem1ActionPerformed
// TODO add your handling code here:
system kl = new system();
kl.setVisible(true);
setVisible(false);
}//GEN-LAST:event_exitMenuItem1ActionPerformed

private void exitMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_exitMenuItem2ActionPerformed

private void menuBarAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-


FIRST:event_menuBarAncestorAdded
// TODO add your handling code here:

Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y); // TODO add your handling code here:


}//GEN-LAST:event_menuBarAncestorAdded

private void exitMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem4ActionPerformed
// TODO add your handling code here:
system kl = new system();
kl.setVisible(true);
setVisible(false);
}//GEN-LAST:event_exitMenuItem4ActionPerformed

private void menuBar1AncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-


FIRST:event_menuBar1AncestorAdded
// TODO add your handling code here:

Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y); // TODO add your handling code here:

}//GEN-LAST:event_menuBar1AncestorAdded

private void exitMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem8ActionPerformed
// TODO add your handling code here:
Mission hu=new Mission();
hu.setVisible(true);
setVisible(false);
}//GEN-LAST:event_exitMenuItem8ActionPerformed

private void exitMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem9ActionPerformed
// TODO add your handling code here:
vision yh = new vision();
yh.setVisible(true);
setVisible(false);
}//GEN-LAST:event_exitMenuItem9ActionPerformed

private void menu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menu1ActionPerformed
// TODO add your handling code here:
JOptionPane.showMessageDialog(null,"The existing textfiles of Bohol are the following nine (9) sites:\n"
+ "BILAR, CARMEN-CENTRAL, GABI, GUINDULMAN, LOON, GARCIA HERNANDEZ, LAS
SALINAS, TALIBON, TUBIGON");

final_read2 thy = new final_read2();


thy.setVisible(true);
setVisible(false);
}//GEN-LAST:event_menu1ActionPerformed

private void menu2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_menu2ActionPerformed

10
// TODO add your handling code here:
JDialog.setDefaultLookAndFeelDecorated(false);
int response = JOptionPane.showConfirmDialog
(null, "This is for the creation of new texfile and data!\n Want for new data entry?", "Confirmation
Message",
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.NO_OPTION) {
JOptionPane.showMessageDialog(null,"ABORTED!");
} else if (response == JOptionPane.YES_OPTION) {

NewJFrame5 hu = new NewJFrame5();


hu.setVisible(true);
setVisible(false);
} else if (response == JOptionPane.CLOSED_OPTION) {
System.out.println("JOptionPane closed");
}

}//GEN-LAST:event_menu2ActionPerformed

private void fileMenu2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_fileMenu2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_fileMenu2ActionPerformed

private void exitMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem5ActionPerformed
// TODO add your handling code here:
BoholMap gh = new BoholMap();
gh.setVisible(true);
setVisible(false);

}//GEN-LAST:event_exitMenuItem5ActionPerformed

private void exitMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_exitMenuItem6ActionPerformed
// TODO add your handling code here:
if (Desktop.isDesktopSupported()) {

try {

File hj = new
File("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/Usermanual_system.pdf");
Desktop.getDesktop().open(hj);
} catch (IOException ex) {

}
}
}//GEN-LAST:event_exitMenuItem6ActionPerformed

public static void main(String args[]) {

try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(HOME.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(HOME.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(HOME.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(HOME.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new HOME().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JMenuItem exitMenuItem;
private javax.swing.JMenuItem exitMenuItem1;
private javax.swing.JMenuItem exitMenuItem2;
private javax.swing.JMenuItem exitMenuItem4;
private javax.swing.JMenuItem exitMenuItem5;
private javax.swing.JMenuItem exitMenuItem6;
private javax.swing.JMenuItem exitMenuItem8;
private javax.swing.JMenuItem exitMenuItem9;
private javax.swing.JMenu fileMenu;
private javax.swing.JMenu fileMenu2;
private javax.swing.JMenu helpMenu;
private javax.swing.JMenu helpMenu1;
private javax.swing.JMenu helpMenu2;
private javax.swing.JMenu helpMenu4;
private javax.swing.JMenu helpMenu5;
private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JSeparator jSeparator3;
private javax.swing.JSeparator jSeparator4;
private java.awt.Label label1;
private java.awt.Label label2;
private java.awt.Label label3;
private java.awt.Label label4;

12
private java.awt.Label label5;
private javax.swing.JButton menu1;
private javax.swing.JButton menu2;
private javax.swing.JMenuBar menuBar;
private javax.swing.JMenuBar menuBar1;
private java.awt.Panel panel2;
// End of variables declaration//GEN-END:variables
}

final_read2.java

package CCNCSCV.to.PPS;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import static java.lang.System.out;
import java.text.DecimalFormat;
import java.util.Formatter;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.ChartRenderingInfo;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.entity.StandardEntityCollection;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;

/**
*
* @author temblor
*/
public class final_read2 extends javax.swing.JFrame {

public final_read2() {
setResizable(false);
initComponents();

}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

printout = new javax.swing.JButton();


panel = new javax.swing.JPanel();
label1 = new java.awt.Label();
jSeparator2 = new javax.swing.JSeparator();
panel2 = new java.awt.Panel();
jSeparator4 = new javax.swing.JSeparator();
jSeparator5 = new javax.swing.JSeparator();
jScrollPane1 = new javax.swing.JScrollPane();
view = new javax.swing.JEditorPane();
home = new javax.swing.JButton();
label2 = new java.awt.Label();
total = new javax.swing.JTextField();
label3 = new java.awt.Label();
label4 = new java.awt.Label();
label5 = new java.awt.Label();
label6 = new java.awt.Label();
label7 = new java.awt.Label();
label8 = new java.awt.Label();
label9 = new java.awt.Label();
stat = new javax.swing.JButton();
Fstd1 = new javax.swing.JButton();
Fstd2 = new javax.swing.JButton();
Fstd3 = new javax.swing.JButton();
label10 = new java.awt.Label();
bohol = new javax.swing.JButton();
label11 = new java.awt.Label();
label12 = new java.awt.Label();
label13 = new java.awt.Label();
wet = new javax.swing.JButton();
dry = new javax.swing.JButton();
conse = new javax.swing.JButton();
MM = new javax.swing.JTextField();
dm = new javax.swing.JTextField();
amn = new javax.swing.JTextField();
mr = new javax.swing.JTextField();
num = new javax.swing.JTextField();
st2 = new javax.swing.JTextField();
s1 = new javax.swing.JTextField();
st3 = new javax.swing.JTextField();
s2 = new javax.swing.JTextField();
s3 = new javax.swing.JTextField();
wd = new javax.swing.JTextField();
dryd = new javax.swing.JTextField();
filename = new javax.swing.JTextField();
year1 = new javax.swing.JTextField();
year2 = new javax.swing.JTextField();
month1 = new javax.swing.JComboBox();
month2 = new javax.swing.JComboBox();
month3 = new javax.swing.JComboBox();
day1 = new javax.swing.JComboBox();
day2 = new javax.swing.JComboBox();
Go = new javax.swing.JButton();

14
label14 = new java.awt.Label();
label15 = new java.awt.Label();
browse = new javax.swing.JButton();
label16 = new java.awt.Label();
monthly = new javax.swing.JButton();
label17 = new java.awt.Label();
label18 = new java.awt.Label();
label19 = new java.awt.Label();
label20 = new java.awt.Label();
Cw = new javax.swing.JTextField();
view3 = new javax.swing.JButton();
bohol1 = new javax.swing.JButton();
printout1 = new javax.swing.JButton();
read2 = new javax.swing.JButton();
label21 = new java.awt.Label();
condry = new javax.swing.JTextField();
consedry = new javax.swing.JButton();
st1 = new javax.swing.JTextField();
label22 = new java.awt.Label();
label23 = new java.awt.Label();
label24 = new java.awt.Label();
min = new javax.swing.JTextField();
jSeparator3 = new javax.swing.JSeparator();

printout.setBackground(java.awt.Color.lightGray);
printout.setFont(new java.awt.Font("Bitstream Charter", 0, 15)); // NOI18N
printout.setForeground(java.awt.Color.gray);
printout.setText("Print Hard Copy");
printout.setBorder(javax.swing.BorderFactory.createEtchedBorder());
printout.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
printoutActionPerformed(evt);
}
});

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

panel.setBackground(new java.awt.Color(185, 195, 216));


panel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));
panel.setForeground(java.awt.Color.black);
panel.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
panelAncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
});

label1.setFont(new java.awt.Font("Bitstream Charter", 1, 24)); // NOI18N


label1.setForeground(new java.awt.Color(75, 110, 138));
label1.setText("RAINFALL PATTERNS IN SELECTED AREAS OF BOHOL");

jSeparator2.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));


panel2.setBackground(java.awt.Color.white);
panel2.setLayout(new java.awt.BorderLayout());

jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);
jSeparator4.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));

jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL);
jSeparator5.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));

view.setEditable(false);
view.setBorder(null);
view.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
view.setForeground(java.awt.Color.black);
jScrollPane1.setViewportView(view);

home.setBackground(new java.awt.Color(195, 202, 214));


home.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
home.setForeground(java.awt.Color.darkGray);
home.setText("HOME");
home.setBorder(null);
home.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
homeActionPerformed(evt);
}
});

label2.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label2.setForeground(java.awt.Color.black);
label2.setText("Sum");

total.setEditable(false);
total.setBackground(java.awt.Color.white);
total.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
total.setForeground(java.awt.Color.black);
total.setHorizontalAlignment(javax.swing.JTextField.CENTER);
total.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));
total.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
totalActionPerformed(evt);
}
});

label3.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label3.setForeground(java.awt.Color.black);
label3.setText("Daily Mean");

label4.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label4.setForeground(java.awt.Color.black);
label4.setText("Monthly Mean");

label5.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label5.setForeground(java.awt.Color.black);
label5.setText("Annual Mean");

label6.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N

16
label6.setForeground(java.awt.Color.black);
label6.setText("Maximum Rainfall");

label7.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label7.setForeground(java.awt.Color.black);
label7.setText("3rd Standard Dev.");

label8.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label8.setForeground(java.awt.Color.black);
label8.setText("2nd Standard Dev.");

label9.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label9.setForeground(java.awt.Color.black);
label9.setText("1st Standard Dev.");

stat.setBackground(new java.awt.Color(195, 202, 214));


stat.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
stat.setForeground(java.awt.Color.black);
stat.setText("VIEW STATISTICAL");
stat.setActionCommand("ANNUAL MEAN");
stat.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
stat.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
statActionPerformed(evt);
}
});

Fstd1.setBackground(new java.awt.Color(195, 202, 214));


Fstd1.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
Fstd1.setForeground(java.awt.Color.black);
Fstd1.setText("View");

Fstd1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
Fstd1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Fstd1ActionPerformed(evt);
}
});

Fstd2.setBackground(new java.awt.Color(195, 202, 214));


Fstd2.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
Fstd2.setForeground(java.awt.Color.black);
Fstd2.setText("View");

Fstd2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
Fstd2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Fstd2ActionPerformed(evt);
}
});

Fstd3.setBackground(new java.awt.Color(195, 202, 214));


Fstd3.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
Fstd3.setForeground(java.awt.Color.black);
Fstd3.setText("View");
Fstd3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
Fstd3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Fstd3ActionPerformed(evt);
}
});

label10.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label10.setForeground(java.awt.Color.black);
label10.setText("Exceeding Rainfall");

bohol.setBackground(new java.awt.Color(195, 202, 214));


bohol.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
bohol.setForeground(java.awt.Color.darkGray);
bohol.setText("STATION DESCRIPTIONS");
bohol.setBorder(null);
bohol.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
boholActionPerformed(evt);
}
});

label11.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label11.setForeground(java.awt.Color.black);
label11.setText("Number of Dry Days");

label12.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label12.setForeground(java.awt.Color.black);
label12.setText("Number of Wet Days");

label13.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label13.setForeground(java.awt.Color.black);
label13.setText("Number of Consecutive Wet Days");

wet.setBackground(new java.awt.Color(195, 202, 214));


wet.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
wet.setForeground(java.awt.Color.black);
wet.setText("View ");
wet.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
wet.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
wetActionPerformed(evt);
}
});

dry.setBackground(new java.awt.Color(195, 202, 214));


dry.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
dry.setForeground(java.awt.Color.black);
dry.setText("View ");
dry.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
dry.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
dryActionPerformed(evt);
}
});

18
conse.setBackground(new java.awt.Color(195, 202, 214));
conse.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
conse.setForeground(java.awt.Color.black);
conse.setText("View");

conse.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
conse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
conseActionPerformed(evt);
}
});

MM.setEditable(false);
MM.setBackground(java.awt.Color.white);
MM.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
MM.setForeground(java.awt.Color.black);
MM.setHorizontalAlignment(javax.swing.JTextField.CENTER);
MM.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

dm.setEditable(false);
dm.setBackground(java.awt.Color.white);
dm.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
dm.setForeground(java.awt.Color.black);
dm.setHorizontalAlignment(javax.swing.JTextField.CENTER);
dm.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

amn.setEditable(false);
amn.setBackground(java.awt.Color.white);
amn.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
amn.setForeground(java.awt.Color.black);
amn.setHorizontalAlignment(javax.swing.JTextField.CENTER);
amn.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

mr.setEditable(false);
mr.setBackground(java.awt.Color.white);
mr.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
mr.setForeground(java.awt.Color.black);
mr.setHorizontalAlignment(javax.swing.JTextField.CENTER);
mr.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

num.setEditable(false);
num.setBackground(java.awt.Color.white);
num.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
num.setForeground(java.awt.Color.black);
num.setHorizontalAlignment(javax.swing.JTextField.CENTER);
num.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

st2.setEditable(false);
st2.setBackground(java.awt.Color.white);
st2.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
st2.setForeground(java.awt.Color.black);
st2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
st2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

s1.setEditable(false);
s1.setBackground(java.awt.Color.white);
s1.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
s1.setForeground(java.awt.Color.black);
s1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
s1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));
s1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
s1ActionPerformed(evt);
}
});

st3.setEditable(false);
st3.setBackground(java.awt.Color.white);
st3.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
st3.setForeground(java.awt.Color.black);
st3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
st3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

s2.setEditable(false);
s2.setBackground(java.awt.Color.white);
s2.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
s2.setForeground(java.awt.Color.black);
s2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
s2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

s3.setEditable(false);
s3.setBackground(java.awt.Color.white);
s3.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
s3.setForeground(java.awt.Color.black);
s3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
s3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

wd.setEditable(false);
wd.setBackground(java.awt.Color.white);
wd.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
wd.setForeground(java.awt.Color.black);
wd.setHorizontalAlignment(javax.swing.JTextField.CENTER);
wd.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

dryd.setEditable(false);
dryd.setBackground(java.awt.Color.white);
dryd.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
dryd.setForeground(java.awt.Color.black);
dryd.setHorizontalAlignment(javax.swing.JTextField.CENTER);
dryd.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

20
filename.setEditable(false);
filename.setBackground(java.awt.Color.white);
filename.setForeground(java.awt.Color.black);
filename.setBorder(javax.swing.BorderFactory.createEtchedBorder());
filename.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
filenameActionPerformed(evt);
}
});

year1.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N


year1.setForeground(java.awt.Color.black);
year1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));
year1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
year1ActionPerformed(evt);
}
});

year2.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N


year2.setForeground(java.awt.Color.black);
year2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

month1.setEditable(true);
month1.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
month1.setForeground(new java.awt.Color(28, 152, 173));
month1.setMaximumRowCount(12);
month1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12" }));
month1.setAutoscrolls(true);
month1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

month2.setBackground(new java.awt.Color(184, 194, 207));


month2.setEditable(true);
month2.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
month2.setForeground(java.awt.Color.black);
month2.setMaximumRowCount(12);
month2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12" }));
month2.setAutoscrolls(true);

month2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED
, null, new java.awt.Color(239, 216, 216), java.awt.Color.lightGray, null));

month3.setBackground(new java.awt.Color(184, 194, 207));


month3.setEditable(true);
month3.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
month3.setForeground(java.awt.Color.black);
month3.setMaximumRowCount(12);
month3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12" }));
month3.setAutoscrolls(true);
month3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED
, null, new java.awt.Color(239, 216, 216), java.awt.Color.lightGray, null));

day1.setBackground(new java.awt.Color(184, 194, 207));


day1.setEditable(true);
day1.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
day1.setForeground(java.awt.Color.black);
day1.setMaximumRowCount(31);
day1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24",
"25", "26", "27", "28", "29", "30", "31" }));

day1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(239, 216, 216), java.awt.Color.lightGray, null));
day1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
day1ActionPerformed(evt);
}
});

day2.setBackground(new java.awt.Color(184, 194, 207));


day2.setEditable(true);
day2.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
day2.setForeground(java.awt.Color.black);
day2.setMaximumRowCount(31);
day2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24",
"25", "26", "27", "28", "29", "30", "31" }));

day2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(239, 216, 216), java.awt.Color.lightGray, null));

Go.setBackground(new java.awt.Color(195, 202, 214));


Go.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
Go.setForeground(java.awt.Color.black);
Go.setText("SUBMIT");
Go.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
Go.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
GoActionPerformed(evt);
}
});

label14.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label14.setForeground(java.awt.Color.black);
label14.setText("YEAR");

label15.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label15.setForeground(java.awt.Color.black);
label15.setText("End Date");

browse.setBackground(new java.awt.Color(195, 202, 214));


browse.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
browse.setForeground(java.awt.Color.black);
browse.setText("OPEN BROWSER");

22
browse.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
browse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
browseActionPerformed(evt);
}
});

label16.setFont(new java.awt.Font("Bitstream Charter", 0, 18)); // NOI18N


label16.setForeground(java.awt.Color.black);
label16.setText(" TEXTFILE NAME:");

monthly.setBackground(new java.awt.Color(195, 202, 214));


monthly.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
monthly.setForeground(java.awt.Color.black);
monthly.setText("MONTHLY AVERAGE");
monthly.setActionCommand("ANNUAL MEAN");

monthly.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
monthly.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
monthlyActionPerformed(evt);
}
});

label17.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label17.setForeground(java.awt.Color.black);
label17.setText("Start Date");

label18.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label18.setForeground(java.awt.Color.black);
label18.setText("MONTH");

label19.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label19.setForeground(java.awt.Color.black);
label19.setText("DAY");

label20.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label20.setForeground(java.awt.Color.black);
label20.setText("Choose what textfile to open");

Cw.setEditable(false);
Cw.setBackground(java.awt.Color.white);
Cw.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
Cw.setForeground(java.awt.Color.black);
Cw.setHorizontalAlignment(javax.swing.JTextField.CENTER);
Cw.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

view3.setBackground(new java.awt.Color(195, 202, 214));


view3.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
view3.setForeground(java.awt.Color.black);
view3.setText("DAILY AVERAGE");

view3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
view3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
view3ActionPerformed(evt);
}
});

bohol1.setBackground(new java.awt.Color(195, 202, 214));


bohol1.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
bohol1.setForeground(java.awt.Color.darkGray);
bohol1.setText("SEE COMPARISON");
bohol1.setBorder(null);
bohol1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bohol1ActionPerformed(evt);
}
});

printout1.setBackground(java.awt.Color.lightGray);
printout1.setFont(new java.awt.Font("Bitstream Charter", 0, 16)); // NOI18N
printout1.setForeground(java.awt.Color.darkGray);
printout1.setText("Print Hard Copy");
printout1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
printout1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
printout1ActionPerformed(evt);
}
});

read2.setBackground(new java.awt.Color(195, 202, 214));


read2.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
read2.setForeground(java.awt.Color.darkGray);
read2.setText("COUNT OF DAYS");
read2.setBorder(null);
read2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
read2ActionPerformed(evt);
}
});

label21.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label21.setForeground(java.awt.Color.black);
label21.setText("Number of Consecutive Dry Days");

condry.setEditable(false);
condry.setBackground(java.awt.Color.white);
condry.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
condry.setForeground(java.awt.Color.black);
condry.setHorizontalAlignment(javax.swing.JTextField.CENTER);
condry.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

consedry.setBackground(new java.awt.Color(195, 202, 214));


consedry.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
consedry.setForeground(java.awt.Color.black);
consedry.setText("View");

consedry.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))
;

24
consedry.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
consedryActionPerformed(evt);
}
});

st1.setEditable(false);
st1.setBackground(java.awt.Color.white);
st1.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
st1.setForeground(java.awt.Color.black);
st1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
st1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

label22.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label22.setForeground(java.awt.Color.black);
label22.setText("Total number of days in a period");
label22.setVisible(false);

label23.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label23.setForeground(java.awt.Color.black);
label23.setText("Total number of days in a period");

label24.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N


label24.setForeground(java.awt.Color.black);
label24.setText("Minimum Rainfall");

min.setEditable(false);
min.setBackground(java.awt.Color.white);
min.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
min.setForeground(java.awt.Color.black);
min.setHorizontalAlignment(javax.swing.JTextField.CENTER);
min.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(69, 110, 189), new java.awt.Color(78, 121, 188), null));

jSeparator3.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));

javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);


panel.setLayout(panelLayout);
panelLayout.setHorizontalGroup(
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 217,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, 165,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addGroup(panelLayout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(label20, javax.swing.GroupLayout.PREFERRED_SIZE, 180,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addGap(40, 40, 40)
.addComponent(browse, javax.swing.GroupLayout.PREFERRED_SIZE, 129,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addGroup(panelLayout.createSequentialGroup()
.addGap(330, 330, 330)
.addComponent(month1, javax.swing.GroupLayout.PREFERRED_SIZE, 60,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING, false)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.TRAILING)
.addGroup(panelLayout.createSequentialGroup()
.addGap(1, 1, 1)
.addComponent(label22, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(412, 412, 412))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
panelLayout.createSequentialGroup()
.addGap(109, 109, 109)
.addComponent(num, javax.swing.GroupLayout.PREFERRED_SIZE, 111,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATE
D)))
.addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, 61,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addGap(71, 71, 71)
.addComponent(label23, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(year2, javax.swing.GroupLayout.PREFERRED_SIZE, 66,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED
)
.addComponent(month3, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED
)
.addComponent(day2, javax.swing.GroupLayout.PREFERRED_SIZE, 82,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)

26
.addComponent(Go, javax.swing.GroupLayout.PREFERRED_SIZE, 76,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(51, 51, 51)
.addComponent(label18, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(46, 46, 46)
.addComponent(label19, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addComponent(year1, javax.swing.GroupLayout.PREFERRED_SIZE, 66,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED
)
.addComponent(month2, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED
)
.addComponent(day1, javax.swing.GroupLayout.PREFERRED_SIZE, 82,
javax.swing.GroupLayout.PREFERRED_SIZE))))))
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 1292,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(panelLayout.createSequentialGroup()
.addContainerGap()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, 723,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(monthly, javax.swing.GroupLayout.PREFERRED_SIZE, 185,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(stat, javax.swing.GroupLayout.PREFERRED_SIZE, 174,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(view3, javax.swing.GroupLayout.PREFERRED_SIZE, 154,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(printout1, javax.swing.GroupLayout.PREFERRED_SIZE, 137,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
panelLayout.createSequentialGroup()
.addGap(35, 35, 35)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addComponent(label5, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.
TRAILING)
.addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label24, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING, false)
.addComponent(MM, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
.addComponent(dm, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(amn, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mr, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(min, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(total))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addGroup(panelLayout.createSequentialGroup()
.addGap(10, 10, 10)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(label13, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.LEADING)
.addComponent(label9, javax.swing.GroupLayout.PREFERRED_SIZE, 117,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignme
nt.LEADING)
.addComponent(st2)
.addComponent(st1, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(st3, javax.swing.GroupLayout.Alignment.TRAILING)))
.addComponent(label21, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(10, 10, 10))
.addGroup(panelLayout.createSequentialGroup()

28
.addGap(39, 39, 39)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, 132,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TR
AILING, false)
.addComponent(s1)
.addComponent(s2)
.addComponent(s3)
.addComponent(dryd, javax.swing.GroupLayout.DEFAULT_SIZE, 52,
Short.MAX_VALUE)
.addComponent(Cw)
.addComponent(condry, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(wd))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING, false)
.addComponent(conse, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(dry, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)
.addComponent(wet, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(Fstd3, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(Fstd2, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(Fstd1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(consedry, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))
.addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 175,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING))
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
panelLayout.createSequentialGroup()
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(318, 318, 318))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
panelLayout.createSequentialGroup()
.addComponent(bohol, javax.swing.GroupLayout.PREFERRED_SIZE, 187,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(bohol1, javax.swing.GroupLayout.PREFERRED_SIZE, 138,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(1, 1, 1)
.addComponent(read2, javax.swing.GroupLayout.PREFERRED_SIZE, 118,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(1, 1, 1)
.addComponent(home, javax.swing.GroupLayout.PREFERRED_SIZE, 76,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(369, 369, 369))))
);
panelLayout.setVerticalGroup(
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(home, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(bohol1, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(read2, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(bohol, javax.swing.GroupLayout.PREFERRED_SIZE, 25,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(10, 10, 10)
.addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGap(25, 25, 25)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(month1, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G)
.addComponent(label22, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAI
LING)
.addComponent(label23, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

30
.addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label20, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BAS
ELINE)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(browse, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(num, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label18, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label19, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addComponent(day1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(month2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(3, 3, 3))
.addComponent(year1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label17, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELIN
E)
.addComponent(day2, javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(month3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(year2, javax.swing.GroupLayout.PREFERRED_SIZE, 31,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(Go, javax.swing.GroupLayout.PREFERRED_SIZE, 32,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(label15, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(15, 15, 15)))
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(10, 10, 10)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGap(1, 1, 1)
.addComponent(total, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addGap(29, 29, 29)
.addComponent(MM, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGap(29, 29, 29)
.addComponent(amn, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(dm, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(mr, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(min, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(16, 16, 16)
.addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.B
ASELINE)
.addComponent(Fstd1)
.addComponent(s1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(st1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addComponent(label8, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.
BASELINE)
.addComponent(Fstd2)
.addComponent(s2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(st2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(label9, javax.swing.GroupLayout.PREFERRED_SIZE,

32
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI
NG)
.addComponent(Fstd3)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BAS
ELINE)
.addComponent(s3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(st3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(10, 10, 10)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(wet)
.addComponent(wd, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(dry)
.addComponent(dryd, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(conse)
.addComponent(Cw, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(condry, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(consedry)))
.addGroup(panelLayout.createSequentialGroup()
.addGap(6, 6, 6)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
panelLayout.createSequentialGroup()
.addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, 393,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASEL
INE)
.addComponent(stat)
.addComponent(monthly)
.addComponent(view3)
.addComponent(printout1)))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label6, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label24, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label21, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 422,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(jSeparator5)
.addComponent(jScrollPane1))
.addGap(30, 30, 30))
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, 1296, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void homeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_homeActionPerformed
// TODO add your handling code here:
HOME nj = new HOME();
nj.setVisible(true);
setVisible(false);

34
}//GEN-LAST:event_homeActionPerformed

private void statActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_statActionPerformed
// TODO add your handling code here:
double g1 = Double.parseDouble(total.getText());
double g3 = Double.parseDouble(MM.getText());
double g2 = Double.parseDouble(dm.getText());
double g5 = Double.parseDouble(mr.getText());
double g6 = Double.parseDouble(st1.getText());
double g7 = Double.parseDouble(st2.getText());
double g8 = Double.parseDouble(st3.getText());
double g9 = Double.parseDouble(wd.getText());
double g10= Double.parseDouble(dryd.getText());

DefaultCategoryDataset dataset = new DefaultCategoryDataset();


dataset.setValue(g1,"","Sum");
dataset.setValue(g2,"","Dmean");
dataset.setValue(g3,"","Mmean");

dataset.setValue(g5,"","MaxRain");
dataset.setValue(g6,"","1stStd");
dataset.setValue(g7,"","2ndStd");
dataset.setValue(g8,"","3rdStd");
dataset.setValue(g9,"","Wet days");
dataset.setValue(g10,"","Dry days");

JFreeChart chart = ChartFactory.createBarChart3D("Statistical Results","","",dataset,


PlotOrientation.HORIZONTAL,false,false,false);
CategoryPlot catPlot = chart.getCategoryPlot();
catPlot.setRangeGridlinePaint(Color.yellow);

chart.setBorderPaint(Color.black);
// chart.setPadding(RectangleInsets.ZERO_INSETS);
catPlot.setBackgroundPaint(Color.DARK_GRAY);
panel2.getBackground();
chart.getTitle().setPaint(Color.WHITE);
ChartPanel chartPanel= new ChartPanel(chart);

panel2.removeAll();
panel2.add(chartPanel, BorderLayout.CENTER);
panel2.validate();
try{
final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
final File file1 = new File("Chart.png");
ChartUtilities.saveChartAsPNG(file1, chart, 600, 400,info);

} catch(IOException e){

}
}//GEN-LAST:event_statActionPerformed

int J;
int fST1=0;
int fST=0;
int wET=0;
int fST2=0;
int fST3=0;
int dRY=0;
int go=0;
int con=0;
int ddd=0;
BufferedReader in;
String filea;

private void Fstd1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_Fstd1ActionPerformed
try {
in = new BufferedReader(new FileReader("sd1.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}

}//GEN-LAST:event_Fstd1ActionPerformed

private void Fstd2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_Fstd2ActionPerformed
try {
in = new BufferedReader(new FileReader("sd2.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}

}//GEN-LAST:event_Fstd2ActionPerformed

private void Fstd3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_Fstd3ActionPerformed

try {
in = new BufferedReader(new FileReader("sd3.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}

36
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}

}//GEN-LAST:event_Fstd3ActionPerformed

private void boholActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_boholActionPerformed
// TODO add your handling code here:
if (Desktop.isDesktopSupported()) {
try {

File hj = new File("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/station.pdf");


Desktop.getDesktop().open(hj);
} catch (IOException ex) {

}
}
}//GEN-LAST:event_boholActionPerformed

private void wetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_wetActionPerformed

try {
in = new BufferedReader(new FileReader("Wet.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}// TODO add your handling code here:

}//GEN-LAST:event_wetActionPerformed

private void dryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_dryActionPerformed

try {
in = new BufferedReader(new FileReader("Dry.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}// TODO add your handling code here:

}//GEN-LAST:event_dryActionPerformed

private void conseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_conseActionPerformed
try {
in = new BufferedReader(new FileReader("CW.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_conseActionPerformed

private void filenameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_filenameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_filenameActionPerformed

private void year1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_year1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_year1ActionPerformed

private void day1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_day1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_day1ActionPerformed
Node newnode;
private void GoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_GoActionPerformed
newnode= new Node(0);

try {
in = new BufferedReader(new FileReader(filea));
Act();

} catch (FileNotFoundException ex) {

38
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}

}//GEN-LAST:event_GoActionPerformed

private void browseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_browseActionPerformed
// TODO add your handling code here:
selectFile.setAcceptAllFileFilterUsed(false);
int returnVal = selectFile.showOpenDialog(final_read2.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
filename.setText(selectFile.getSelectedFile().getAbsolutePath());
JOptionPane.showMessageDialog(null,"The textfile is successfully open.");
}

filea=filename.getText();

if (returnVal == JFileChooser.CANCEL_OPTION) {
filename.setText("");
}
}//GEN-LAST:event_browseActionPerformed

private void panelAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-


FIRST:event_panelAncestorAdded
Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y); // TODO add your handling code here:


}//GEN-LAST:event_panelAncestorAdded

private void totalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_totalActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_totalActionPerformed

private void monthlyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_monthlyActionPerformed
// TODO add your handling code here

int i;
XYSeriesCollection dataset = new XYSeriesCollection();
XYSeries series1;
series1 = new XYSeries(filea);

for (i = 0; i < 12; i++) {


series1.add(i + 1, MONTHLY[i]);
}
dataset.addSeries(series1);

String chartTitle = "Monthly Mean";


String xAxisLabel = "Month";
String yAxisLabel = "Range";

boolean showLegend = false;


boolean createURL = false;
boolean createTooltip = false;
JFreeChart chart;
chart = ChartFactory.createXYLineChart(chartTitle,
xAxisLabel, yAxisLabel, dataset,
PlotOrientation.VERTICAL, showLegend, createTooltip, createURL);
XYPlot plot = chart.getXYPlot();
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
plot.setRenderer(renderer);

ChartPanel chartpanel = new ChartPanel(chart);


panel2.removeAll();
panel2.add(chartpanel, BorderLayout.CENTER);
panel2.validate(); // TODO add your handling code here:

}//GEN-LAST:event_monthlyActionPerformed

private void s1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_s1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_s1ActionPerformed

private void view3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_view3ActionPerformed
// TODO add your handling code here:
int i;

XYSeriesCollection dataset = new XYSeriesCollection();


XYSeries series1 = new XYSeries(filea);
int ii = 1956;
for (i = 0; i < 30; i++) {
series1.add(ii, YEARLY[i]);
ii++;
}

dataset.addSeries(series1);

String chartTitle = "Daily Mean";


String xAxisLabel = "Year";
String yAxisLabel = "Mean";

boolean showLegend = false;


boolean createURL = false;
boolean createTooltip = false;
JFreeChart chart;
chart = ChartFactory.createXYLineChart(chartTitle,
xAxisLabel, yAxisLabel, dataset,

40
PlotOrientation.VERTICAL, showLegend, createTooltip, createURL);
XYPlot plot = chart.getXYPlot();
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
plot.setRenderer(renderer);

ChartPanel chartpanel = new ChartPanel(chart);


panel2.removeAll();
panel2.add(chartpanel, BorderLayout.CENTER);
panel2.validate();
}//GEN-LAST:event_view3ActionPerformed

private void bohol1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_bohol1ActionPerformed
// TODO add your handling code here:
if (Desktop.isDesktopSupported()) {
try {

File hj = new File("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/comparison.pdf");


Desktop.getDesktop().open(hj);
} catch (IOException ex) {

}
}

}//GEN-LAST:event_bohol1ActionPerformed

private void printoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_printoutActionPerformed

}//GEN-LAST:event_printoutActionPerformed

private void printout1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_printout1ActionPerformed
Formatter out;
try {
out = new Formatter("bin.txt");

out.format(filename.getText()+"\n\n\t From " +(String) month1.getSelectedItem()+"/ "+(String)


day1.getSelectedItem()+"/ "+year1.getText());
out.format(" To " +(String) month2.getSelectedItem()+"/ "+(String) day2.getSelectedItem()+"/
"+year2.getText()+"\n");

out.format("\n\n"+ view.getText()+"\n\n");

out.format("\n\t STATISTICAL RECORDS");


out.format("\n\n\t Maximum Rainfall = "+mr.getText()+"\n");
out.format("\t Annual Mean = "+amn.getText()+"\n");
out.format("\t Sum = "+total.getText()+"\n");
out.format("\t Monthly Mean = "+MM.getText()+"\n");
out.format("\t Number of Wet Days = "+wd.getText()+"\n");
out.format("\t Number of Dry Days = "+dryd.getText()+"\n");
out.format("\t 1st Standard Deviation = "+st1.getText()+" \t Frequency= "+s1.getText()+"\n");
out.format("\t 2st Standard Deviation = "+st2.getText()+" \t Frequency= "+s2.getText()+"\n");
out.format("\t 3st Standard Deviation = "+st3.getText()+" \t Frequency= "+s3.getText()+"\n");
out.format("\t Number of consecutive Wet Days = "+Cw.getText()+"\n");
out.format("\t Number of consecutive Dry Days = "+condry.getText()+"\n\n");
out.close();
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}

createFiletoPrint1 print=new createFiletoPrint1();


print.setVisible(true);
setVisible(false);
}//GEN-LAST:event_printout1ActionPerformed

private void read2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_read2ActionPerformed
if (Desktop.isDesktopSupported()) {
try {

File hj = new File("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/days.pdf");


Desktop.getDesktop().open(hj);
} catch (IOException ex) {

}
}
}//GEN-LAST:event_read2ActionPerformed

private void consedryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_consedryActionPerformed
// TODO add your handling code here:
try {
in = new BufferedReader(new FileReader("CD.txt"));
} catch (FileNotFoundException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
try {
String forviewa="";
for (String x=in.readLine(); x != null ; x = in.readLine()) {
forviewa=forviewa+x+"\n";
}
view.setText(forviewa);
} catch (IOException ex) {
Logger.getLogger(final_read2.class.getName()).log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_consedryActionPerformed

JFileChooser selectFile = new JFileChooser();

Formatter totalOutput;
String forview;

double meantotal;
count1 mn;
Formatter out;
double [] MONTHLY=new double[12];
double [] YEARLY=new double[30];

public void Act() throws IOException{

42
mn=new count1();
Formatter output1,output2,output3,output4,output5,output6,output7;

output1= new Formatter("sd1.txt");


output2= new Formatter("sd2.txt");
output3= new Formatter("sd3.txt");
output4= new Formatter("Dry.txt");
output5= new Formatter("Wet.txt");
process1 convrt=new process1();
String yr1,zero="000",yr2;
int yy1,yy2,mm,mm2,dd,dd2,newyear1,newyear2;
forview="";
yr1=year1.getText();
yr2=year2.getText();

yy1=Integer.valueOf(yr1+zero);
yy2=Integer.valueOf(yr2+zero);
int yF=Integer.valueOf(yr1);
int yS=Integer.valueOf(yr2);
mm=Integer.valueOf((String) month2.getSelectedItem());
mm2=Integer.valueOf((String) month3.getSelectedItem());
dd=Integer.valueOf((String) day1.getSelectedItem());
dd2=Integer.valueOf((String) day2.getSelectedItem());
newyear1=convrt.convert(mm, dd, yy1);
newyear2=convrt.convert(mm2,dd2,yy2);
double [] Re1=new double[30];
double [] YR=new double[30];

for(int i=0;i<30;i++){
Re1[i]=0;
YR[i]=0;

}
int bb,size = 0,j=0,integer=0, counting =0;
Formatter out;
String AD="";
Double tonode,sum,SUM=0.0;
DecimalFormat df= new DecimalFormat("#.##");
DecimalFormat dff= new DecimalFormat("#.####");
mn.old(yF,yS,newyear2);
for (String x = in.readLine(); x != null ; x = in.readLine()) {

bb=x.length();
int cll=Integer.valueOf(x.substring(0,7));
int cll1=Integer.valueOf(x.substring(0,4));
int cll2=Integer.valueOf(x.substring(4,7));

if((cll >= newyear1)&&(cll <= newyear2)){


// JOptionPane.showMessageDialog(null,x);
AD=AD+x+"\n";
forview=forview+x+"\n";
tonode=Double.valueOf(x.substring(8,bb));
size=newnode.push(tonode);

SUM=SUM+tonode;
j++;

if(cll2==365){

if(j==365){

Re1[integer]=SUM;
YR[integer]=yF;
integer++;

j=0;
SUM=0.0;
// SUM=SUM+tonode;
yF=cll1;

}
mn.month(x,cll1);
counting++;
}

}
JOptionPane.showMessageDialog(null,"The number of days in a period are "+counting);

out= new Formatter("files.txt");


out.format(AD);
out.close();

double [] x=new double[12];


int [] y=new int[12];
double [] X=new double[30];
int [] Y=new int[30];

x=mn.rsum();
y=mn.rcount();
X=mn.Rsum();
Y=mn.Rcount();
// int YeAr=mn.Year();
int mos,Yers=0;
double am;
mos=0;
am=0;
for(int i=0;i<12;i++){
MONTHLY[i]=x[i]/y[i];
if(y[i]!=0){
mos++;
am=am+MONTHLY[i];}
}
mos=0;
am=0;
if(y[0]!=0){
mos=y[0]/31;
Yers=Yers+mos;

44
}
if(y[1]!=0){
mos=y[1]/28;
Yers=Yers+mos;

}
if(y[2]!=0){
mos=y[2]/31;
Yers=Yers+mos;

}
if(y[3]!=0){
mos=y[3]/30;
Yers=Yers+mos;

}
if(y[4]!=0){
mos=y[4]/31;
Yers=Yers+mos;

}
if(y[5]!=0){
mos=y[5]/30;
Yers=Yers+mos;

}
if(y[6]!=0){
mos=y[6]/31;
Yers=Yers+mos;

}
if(y[7]!=0){
mos=y[7]/31;
Yers=Yers+mos;

}
if(y[8]!=0){
mos=y[8]/30;
Yers=Yers+mos;

}
if(y[9]!=0){
mos=y[9]/31;
Yers=Yers+mos;

}
if(y[10]!=0){
mos=y[10]/30;
Yers=Yers+mos;

}
if(y[11]!=0){
mos=y[11]/31;
Yers=Yers+mos;

for(int i=0;i<30;i++){
YEARLY[i]=X[i]/Y[i];

}
int ii=0;
SUM=0.0;
for(int i=0;i<integer;i++){
SUM=SUM+Re1[i];
ii++;

}
if(integer>0){
amn.setText(String.valueOf(Double.parseDouble(df.format(SUM/ii))));
}
else{
amn.setText(String.valueOf("No Data"));
}

int F1=0,F2=0,F3=0,F4=0,F5=0,F6=0,F7=0,mon,DAY;
// process p=new process();

in = new BufferedReader(new FileReader(new File("files.txt")));


double MAx=newnode.Max();
double MIn=newnode.Min();

double ST=Double.parseDouble(dff.format(newnode.stdeviation(meantotal)));
double ST2=Double.parseDouble(dff.format(newnode.stdeviation2(meantotal)));
double ST3=Double.parseDouble(dff.format(newnode.stdeviation3(meantotal)));

for (String xxx = in.readLine(); xxx != null ; xxx = in.readLine()) {


bb=xxx.length();
int cll=Integer.valueOf(xxx.substring(0,7));
if((cll >= newyear1)&&(cll <= newyear2)){

tonode=Double.valueOf(xxx.substring(8,bb));

sum=newnode.sum();
sum = Double.parseDouble(df.format(sum));
total.setText(String.valueOf(sum));
meantotal=sum/size;

if(tonode>=ST+meantotal){
F1++;
output1.format(xxx+"\n");
}
if(tonode>=ST2+meantotal){
F2++;

46
output2.format(xxx+"\n");
}
if(tonode>=ST3+meantotal){
F3++;
output3.format(xxx+"\n");
}
if(tonode<0.1){
F4++;
F6++;
output4.format(xxx+"\n");
// output6.format(xxx+"\n");
}else{
F5++;
F7++;
output5.format(xxx+"\n");
// output7.format(xxx+"\n");
}

MM.setText(String.valueOf(Double.parseDouble(df.format(mn.al()/Yers))));

meantotal= Double.parseDouble(df.format(meantotal));
mos=0;

for(int i=1;i<=size;i++){
if(i==365){
mos++;
}

dm.setText(String.valueOf(Double.parseDouble(df.format(meantotal))));

s1.setText(String.valueOf(F1));
s2.setText(String.valueOf(F2));
s3.setText(String.valueOf(F3));
dryd.setText(String.valueOf(F4));
wd.setText(String.valueOf(F5));

st1.setText(String.valueOf(ST));
st2.setText(String.valueOf(ST2));
st3.setText(String.valueOf(ST3));
num.setText(String.valueOf(counting +" "+ "Days"));

mr.setText(String.valueOf(Double.parseDouble(df.format(MAx))));
min.setText(String.valueOf(Double.parseDouble(df.format(MIn))));

view.setText(forview);

output1.close();
output2.close();
output3.close();
output4.close();
output5.close();
consecutive1 Con= new consecutive1("w");
consecutive1 Con1= new consecutive1("w");
in = new BufferedReader(new FileReader("Wet.txt"));
for (String xxx = in.readLine(); xxx != null ; xxx = in.readLine()) {
Con.push(xxx);
}
Cw.setText(String.valueOf(Con.Date1("CW.txt")));

in = new BufferedReader(new FileReader("Dry.txt"));


for (String xxx = in.readLine(); xxx != null ; xxx = in.readLine()) {
Con1.push(xxx);
}
condry.setText(String.valueOf(Con1.Date1("CD.txt"))); }

NewJFrame5.java

package CCNCSCV.to.PPS;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.util.Formatter;
import java.io.*;
import java.io.IOException;
import static java.lang.System.in;
import java.util.FormatterClosedException;
import java.util.NoSuchElementException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;

/**
 *
 * @author temblor
 */
public class NewJFrame5 extends javax.swing.JFrame {

public NewJFrame5() {
setUndecorated(true);

initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jPanel1 = new javax.swing.JPanel();


jLabel1 = new javax.swing.JLabel();
filename = new javax.swing.JTextField();
Clear = new javax.swing.JButton();
Open = new javax.swing.JButton();
display = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();

48
save = new javax.swing.JButton();
jSeparator1 = new javax.swing.JSeparator();
label2 = new java.awt.Label();
jLabel6 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
view2 = new javax.swing.JEditorPane();
jSeparator2 = new javax.swing.JSeparator();
label3 = new java.awt.Label();
home1 = new javax.swing.JButton();
yer = new javax.swing.JTextField();
jLabel29 = new javax.swing.JLabel();
jLabel31 = new javax.swing.JLabel();
month = new javax.swing.JComboBox();
jLabel32 = new javax.swing.JLabel();
day = new javax.swing.JComboBox();
jLabel33 = new javax.swing.JLabel();
rain = new javax.swing.JTextField();
label4 = new java.awt.Label();
Open1 = new javax.swing.JButton();
read = new javax.swing.JButton();
read1 = new javax.swing.JButton();
read2 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBackground(new java.awt.Color(185, 195, 216));


jPanel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));
jPanel1.setForeground(java.awt.Color.black);
jPanel1.setPreferredSize(new java.awt.Dimension(1643, 703));
jPanel1.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
jPanel1AncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
});

jLabel1.setFont(new java.awt.Font("Century Schoolbook L", 1, 16)); // NOI18N


jLabel1.setForeground(java.awt.Color.black);
jLabel1.setText("Create your File Name:");

filename.setFont(new java.awt.Font("Bitstream Charter", 0, 16)); // NOI18N


filename.setForeground(java.awt.Color.black);
filename.setBorder(javax.swing.BorderFactory.createEtchedBorder());
filename.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
filenameActionPerformed(evt);
}
});

Clear.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


Clear.setForeground(java.awt.Color.black);
Clear.setText("Clear");
Clear.setBorder(javax.swing.BorderFactory.createEtchedBorder());
Clear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ClearActionPerformed(evt);
}
});

Open.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


Open.setForeground(java.awt.Color.black);
Open.setText("Create");
Open.setBorder(javax.swing.BorderFactory.createEtchedBorder());
Open.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
OpenActionPerformed(evt);
}
});

display.setEditable(false);
display.setFont(new java.awt.Font("Bitstream Charter", 0, 16)); // NOI18N
display.setForeground(java.awt.Color.black);
display.setBorder(javax.swing.BorderFactory.createEtchedBorder());
display.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
displayActionPerformed(evt);
}
});

jLabel8.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jLabel8.setForeground(java.awt.Color.black);
jLabel8.setText("The name of your Textfile:");

save.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


save.setForeground(java.awt.Color.black);
save.setText("Save Data");
save.setBorder(javax.swing.BorderFactory.createEtchedBorder());
save.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
saveActionPerformed(evt);
}
});

label2.setAlignment(java.awt.Label.CENTER);
label2.setFont(new java.awt.Font("DejaVu Sans Mono", 1, 18)); // NOI18N
label2.setForeground(java.awt.Color.black);
label2.setText("Creation of Textfile");

jLabel6.setFont(new java.awt.Font("Century Schoolbook L", 2, 18)); // NOI18N


jLabel6.setForeground(java.awt.Color.black);
jLabel6.setText("[Fill-up the following data below correctly. Follow the format]");

view2.setEditable(false);
view2.setBackground(java.awt.Color.white);
view2.setBorder(null);
view2.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
jScrollPane1.setViewportView(view2);

jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);

50
label3.setFont(new java.awt.Font("Bitstream Charter", 1, 15)); // NOI18N
label3.setForeground(java.awt.Color.black);
label3.setText("First Set of Records");

home1.setBackground(new java.awt.Color(195, 202, 214));


home1.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
home1.setForeground(java.awt.Color.black);
home1.setText("BACK");
home1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
home1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
home1ActionPerformed(evt);
}
});

yer.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


yer.setForeground(new java.awt.Color(64, 52, 52));
yer.setBorder(javax.swing.BorderFactory.createEtchedBorder());

jLabel29.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jLabel29.setForeground(java.awt.Color.black);
jLabel29.setText("Year:");

jLabel31.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jLabel31.setForeground(java.awt.Color.black);
jLabel31.setText("Month:");

month.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


month.setForeground(new java.awt.Color(28, 152, 173));
month.setMaximumRowCount(12);
month.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12" }));
month.setAutoscrolls(true);
month.setBorder(javax.swing.BorderFactory.createEtchedBorder());

jLabel32.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jLabel32.setForeground(java.awt.Color.black);
jLabel32.setText("Day:");

day.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


day.setForeground(new java.awt.Color(28, 152, 173));
day.setMaximumRowCount(31);
day.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05",
"06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24",
"25", "26", "27", "28", "29", "30", "31" }));
day.setBorder(javax.swing.BorderFactory.createEtchedBorder());

jLabel33.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jLabel33.setForeground(java.awt.Color.black);
jLabel33.setText("Rainfall:");

rain.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


rain.setForeground(new java.awt.Color(64, 52, 52));
rain.setBorder(javax.swing.BorderFactory.createEtchedBorder());
label4.setAlignment(java.awt.Label.CENTER);
label4.setFont(new java.awt.Font("DejaVu Sans Mono", 1, 18)); // NOI18N
label4.setForeground(java.awt.Color.black);
label4.setText("Append Record to an existing Textfile");

Open1.setBackground(java.awt.Color.white);
Open1.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
Open1.setForeground(java.awt.Color.black);
Open1.setText("Browse");

Open1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)
);
Open1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Open1ActionPerformed(evt);
}
});

read.setBackground(new java.awt.Color(195, 202, 214));


read.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
read.setForeground(java.awt.Color.black);
read.setText("READ TEXTFILE");

read.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
read.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
readActionPerformed(evt);
}
});

read1.setBackground(new java.awt.Color(195, 202, 214));


read1.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
read1.setForeground(java.awt.Color.black);
read1.setText("MODIFY RECORD");

read1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
read1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
read1ActionPerformed(evt);
}
});

read2.setBackground(new java.awt.Color(195, 202, 214));


read2.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
read2.setForeground(java.awt.Color.black);
read2.setText("Count of days");

read2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
read2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
read2ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);


jPanel1.setLayout(jPanel1Layout);

52
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING
)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(78, 78, 78)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEA
DING)
.addComponent(jLabel6)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel29)
.addGap(33, 33, 33)
.addComponent(yer, javax.swing.GroupLayout.PREFERRED_SIZE, 75,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel31)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(month, javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(28, 28, 28)
.addComponent(jLabel32)
.addGap(4, 4, 4)
.addComponent(day, javax.swing.GroupLayout.PREFERRED_SIZE, 79,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jLabel33)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(rain, javax.swing.GroupLayout.PREFERRED_SIZE, 75,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(display))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(Open1, javax.swing.GroupLayout.PREFERRED_SIZE, 92,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(79, 79, 79)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAI
LING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(Open, javax.swing.GroupLayout.PREFERRED_SIZE, 95,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Clear, javax.swing.GroupLayout.PREFERRED_SIZE, 80,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 212,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.
LEADING)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 341,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 386,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(0, 0, Short.MAX_VALUE)))
.addGap(54, 54, 54))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jSeparator1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(read, javax.swing.GroupLayout.PREFERRED_SIZE, 138,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(read1, javax.swing.GroupLayout.PREFERRED_SIZE, 162,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(read2, javax.swing.GroupLayout.PREFERRED_SIZE, 138,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(78, 78, 78)))
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 15,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(134, 134, 134)
.addComponent(home1, javax.swing.GroupLayout.PREFERRED_SIZE, 66,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(23, 23, 23)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 142,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 169,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(41, 41, 41)
.addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 99,
javax.swing.GroupLayout.PREFERRED_SIZE))))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 588,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()

54
.addComponent(home1)
.addGap(64, 64, 64)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 409,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(save)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(read)
.addComponent(read1)
.addComponent(read2))
.addGap(46, 46, 46)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(26, 26, 26)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 33,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Open)
.addComponent(Clear))
.addGap(18, 18, 18)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 17,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(37, 37, 37)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(46, 46, 46)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(display, javax.swing.GroupLayout.PREFERRED_SIZE, 28,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(Open1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel6)
.addGap(29, 29, 29)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel29)
.addComponent(yer, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel31)
.addComponent(month, javax.swing.GroupLayout.PREFERRED_SIZE, 27,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel32)
.addComponent(day, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel33)
.addComponent(rain, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(67, 67, 67))
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 975,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 574,
javax.swing.GroupLayout.PREFERRED_SIZE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void filenameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_filenameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_filenameActionPerformed

private void ClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_ClearActionPerformed
filename.setText("");
display.setText("");
}//GEN-LAST:event_ClearActionPerformed

public int check(String b){


int bb,c,yes = 0;
String ee,DD=".txt";
boolean com;

bb=b.length();
if(bb>4){
c=bb-4;
ee = b.substring(c,bb);
com =ee.equals(DD);
if(com==false){
JOptionPane.showMessageDialog(null,"Not a Text File! Make sure to have a '.text' file name extension.");
yes=0;
}
else{
yes=1;

}
}else{
JOptionPane.showMessageDialog(null,"Please input a filename!");
}
return yes;
}

56
private void OpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_OpenActionPerformed

int pwd;
pwd=check(filename.getText());
if(pwd==1){
try {
output= new Formatter(filename.getText());
JOptionPane.showMessageDialog(null,"Text file created succesfuly!");
// filename.setText("");
// display.setText(a);
} catch (FileNotFoundException ex) {
Logger.getLogger(NewJFrame5.class.getName()).log(Level.SEVERE, null, ex);
}
}else{
filename.setText("");
// display.setText("");
}

}//GEN-LAST:event_OpenActionPerformed

JFileChooser selectFile = new JFileChooser();


int go=0;BufferedReader in;
Formatter output;
String view1;

private void displayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_displayActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_displayActionPerformed

private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_saveActionPerformed

try {
Act();
yer.setText("");
rain.setText("");
month.setSelectedItem("1");
day.setSelectedItem("1");
view2.setText(view1);
} catch (IOException ex) {
Logger.getLogger(NewJFrame5.class.getName()).log(Level.SEVERE, null, ex);
}

}//GEN-LAST:event_saveActionPerformed
private void home1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_home1ActionPerformed
// TODO add your handling code here:
HOME hj = new HOME();
hj.setVisible(true);
setVisible(false);
}//GEN-LAST:event_home1ActionPerformed

BufferedWriter ins;
public void Act() throws IOException{
String sp=" ", ne="\n",view3;
File file = new File(display.getText());
FileWriter fileWriter = new FileWriter(file,true);
ins = new BufferedWriter(fileWriter);
process1 convrt=new process1();
String yr = yer.getText();

if(yer.getText().length()==4){

String zero="000";
Integer yy = Integer.valueOf(yr+zero);
Integer mm = Integer.valueOf((String) month.getSelectedItem());
Integer dd = Integer.valueOf((String) day.getSelectedItem());
int newyear = convrt.convert(mm, dd, yy);
in = new BufferedReader(new FileReader(display.getText()));
int done=0;
for (String xxx = in.readLine(); xxx != null ; xxx = in.readLine()) {
if(Integer.valueOf(xxx.substring(0,7))==newyear){
yer.setText("");
rain.setText("");
month.setSelectedItem("1");
day.setSelectedItem("1");
if(dd==dd){
JOptionPane.showMessageDialog(null,"Date already contains a data!");
done=1;
}
}
}
in.close();
double r;
r=Double.valueOf(rain.getText());
String Rain=rain.getText();
boolean incorrect = false;

do{
if(r<0){
JOptionPane.showMessageDialog(null,"Error in inputting the rainfall amount. Accepted values are
greater than or equal to 0");
rain.setText("");
Rain=JOptionPane.showInputDialog("Please "+
"input the right Rainfall amount: ");

58
}while(incorrect);
if(done==0){
view3=String.valueOf(newyear)+sp+Rain+ne;
view1=view1+view3;
ins.append(view3);

else{
JOptionPane.showMessageDialog(null,"Invalid Year! please input correclty.");
yer.setText("");

}
ins.close();
}

private void jPanel1AncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-


FIRST:event_jPanel1AncestorAdded
Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y);
}//GEN-LAST:event_jPanel1AncestorAdded

private void Open1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_Open1ActionPerformed
selectFile.setAcceptAllFileFilterUsed(false);
view1="";
int returnVal = selectFile.showOpenDialog(NewJFrame5.this);
if (returnVal == JFileChooser.APPROVE_OPTION)
{
display.setText(selectFile.getSelectedFile().getAbsolutePath());

JOptionPane.showMessageDialog(null,"Opening the file is Successful");


try {
in = new BufferedReader(new FileReader(display.getText()));
for (String xxx = in.readLine(); xxx != null ; xxx = in.readLine()) {

view1=view1+xxx+"\n";
}
view2.setText(view1);

in.close();
} catch (FileNotFoundException ex) {
Logger.getLogger(NewJFrame5.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(NewJFrame5.class.getName()).log(Level.SEVERE, null, ex);
}
}
if (returnVal == JFileChooser.CANCEL_OPTION)
{
display.setText("");

}
}//GEN-LAST:event_Open1ActionPerformed

private void readActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_readActionPerformed
// TODO add your handling code here:
JOptionPane.showMessageDialog(null,"Note: This program can only read a textfile with a span of 81
years!");

final_read thyui = new final_read();


thyui.setVisible(true);
setVisible(false);

}//GEN-LAST:event_readActionPerformed

private void read1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_read1ActionPerformed
// TODO add your handling code here:

JDialog.setDefaultLookAndFeelDecorated(false);
int response = JOptionPane.showConfirmDialog
(null, "Sure you want to change a record(s)?", "Confirmation Message",
JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (response == JOptionPane.NO_OPTION) {
JOptionPane.showMessageDialog(null,"ABORTED!");
} else if (response == JOptionPane.YES_OPTION) {

Modifier ht = new Modifier();


ht.setVisible(true);
setVisible(false);

} else if (response == JOptionPane.CLOSED_OPTION) {


System.out.println("JOptionPane closed");
}

}//GEN-LAST:event_read1ActionPerformed

private void read2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_read2ActionPerformed
// TODO add your handling code here:
if (Desktop.isDesktopSupported()) {
try {

File hj = new File("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/days.pdf");


Desktop.getDesktop().open(hj);

60
} catch (IOException ex) {

}
}
}//GEN-LAST:event_read2ActionPerformed

public static void main(String args[]) {

try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame5.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame5.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame5.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame5.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
}

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame5().setVisible(true);
}
});
}

private javax.swing.JButton Clear;


private javax.swing.JButton Open;
private javax.swing.JButton Open1;
private javax.swing.JComboBox day;
private javax.swing.JTextField display;
private javax.swing.JTextField filename;
private javax.swing.JButton home1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel29;
private javax.swing.JLabel jLabel31;
private javax.swing.JLabel jLabel32;
private javax.swing.JLabel jLabel33;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel8;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private java.awt.Label label2;
private java.awt.Label label3;
private java.awt.Label label4;
private javax.swing.JComboBox month;
private javax.swing.JTextField rain;
private javax.swing.JButton read;
private javax.swing.JButton read1;
private javax.swing.JButton read2;
private javax.swing.JButton save;
private javax.swing.JEditorPane view2;
private javax.swing.JTextField yer;
// End of variables declaration//GEN-END:variables
}

Modifier.java

import java.awt.Toolkit;
import java.io.File;
import java.io.IOException;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

/**
*
* @author temblor
*/
public class Modifier extends javax.swing.JFrame {

/** Creates new form Modifier */


public Modifier() {
setResizable(false);
initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

panel = new javax.swing.JPanel();


label2 = new java.awt.Label();
jLabel1 = new javax.swing.JLabel();
filename = new javax.swing.JTextField();
browse = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
display = new javax.swing.JTextField();
save = new javax.swing.JButton();
home1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

62
panel.setBackground(new java.awt.Color(185, 195, 216));
panel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));
panel.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
panelAncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
});

label2.setAlignment(java.awt.Label.CENTER);
label2.setFont(new java.awt.Font("DejaVu Sans Mono", 1, 18)); // NOI18N
label2.setText("Modify Record to an existing Textfile");

jLabel1.setFont(new java.awt.Font("Century Schoolbook L", 0, 16)); // NOI18N


jLabel1.setText("Textfile name:");

filename.setBackground(java.awt.Color.white);
filename.setFont(new java.awt.Font("Bitstream Charter", 0, 16)); // NOI18N
filename.setForeground(java.awt.Color.black);

filename.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))
;
filename.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
filenameActionPerformed(evt);
}
});

browse.setBackground(java.awt.Color.white);
browse.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
browse.setForeground(java.awt.Color.black);
browse.setText("Browse");

browse.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
browse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
browseActionPerformed(evt);
}
});

jLabel2.setFont(new java.awt.Font("Century Schoolbook L", 0, 16)); // NOI18N


jLabel2.setText("The textfile is:");

display.setEditable(false);
display.setBackground(java.awt.Color.white);
display.setFont(new java.awt.Font("Bitstream Charter", 0, 17)); // NOI18N
display.setForeground(java.awt.Color.black);

display.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
display.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
displayActionPerformed(evt);
}
});

save.setBackground(java.awt.Color.white);
save.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N
save.setForeground(java.awt.Color.black);
save.setText("Open Text Editor");

save.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
save.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
saveActionPerformed(evt);
}
});

home1.setBackground(new java.awt.Color(195, 202, 214));


home1.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
home1.setForeground(java.awt.Color.black);
home1.setText("BACK");

home1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
home1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
home1ActionPerformed(evt);
}
});

javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);


panel.setLayout(panelLayout);
panelLayout.setHorizontalGroup(
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(browse, javax.swing.GroupLayout.PREFERRED_SIZE, 166,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 167,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addGap(65, 65, 65)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 133,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(display))
.addGroup(panelLayout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 133,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 328,
javax.swing.GroupLayout.PREFERRED_SIZE))))))

64
.addGap(231, 231, 231))
.addGroup(panelLayout.createSequentialGroup()
.addGap(160, 160, 160)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(home1, javax.swing.GroupLayout.PREFERRED_SIZE, 52,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(73, 73, 73))
);
panelLayout.setVerticalGroup(
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelLayout.createSequentialGroup()
.addComponent(home1)
.addGap(42, 42, 42)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51,
Short.MAX_VALUE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel1)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 37,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(browse, javax.swing.GroupLayout.PREFERRED_SIZE, 42,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(display, javax.swing.GroupLayout.PREFERRED_SIZE, 28,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(save, javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(77, 77, 77))
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, 700,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void panelAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-


FIRST:event_panelAncestorAdded
Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y); // TODO add your handling code here:


}//GEN-LAST:event_panelAncestorAdded

private void filenameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_filenameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_filenameActionPerformed
JFileChooser selectFile = new JFileChooser();
private void browseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-
FIRST:event_browseActionPerformed
selectFile.setAcceptAllFileFilterUsed(false);
int returnVal = selectFile.showOpenDialog(Modifier.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
display.setText(selectFile.getSelectedFile().getAbsolutePath());
filename.setText(selectFile.getSelectedFile().getAbsolutePath());

} JOptionPane.showMessageDialog(null,"Opening the file is Successful");

if (returnVal == JFileChooser.CANCEL_OPTION) {
filename.setText("");
display.setText("");
}
}//GEN-LAST:event_browseActionPerformed

private void displayActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_displayActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_displayActionPerformed

private void saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_saveActionPerformed

String b=filename.getText();
File file = null;
Runtime rs = Runtime.getRuntime();

file =new File(b);


String abs= file.getAbsolutePath();
try {
rs.exec("leafpad "+abs);
} catch (IOException e) {
System.out.println(e);
}
}//GEN-LAST:event_saveActionPerformed

private void home1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-

66
FIRST:event_home1ActionPerformed
// TODO add your handling code here:
NewJFrame5 hj = new NewJFrame5();
hj.setVisible(true);
setVisible(false);
}//GEN-LAST:event_home1ActionPerformed

public static void main(String args[]) {


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Modifier().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton browse;
private javax.swing.JTextField display;
private javax.swing.JTextField filename;
private javax.swing.JButton home1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private java.awt.Label label2;

private javax.swing.JPanel panel;

private javax.swing.JButton save;

// End of variables declaration//GEN-END:variables

system.java

package CCNCSCV.to.PPS;

import java.awt.Dimension;
import java.awt.Toolkit;

/**
*
* @author temblor
*/
public class system extends javax.swing.JFrame {

public system() {
setResizable(false);
initComponents();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panel = new javax.swing.JPanel();
label2 = new java.awt.Label();
label1 = new java.awt.Label();
label4 = new java.awt.Label();
label5 = new java.awt.Label();
label7 = new java.awt.Label();
label8 = new java.awt.Label();
label9 = new java.awt.Label();
label10 = new java.awt.Label();
label3 = new java.awt.Label();
label11 = new java.awt.Label();
label12 = new java.awt.Label();
label13 = new java.awt.Label();
label14 = new java.awt.Label();
label15 = new java.awt.Label();
label16 = new java.awt.Label();
label17 = new java.awt.Label();
label18 = new java.awt.Label();
label19 = new java.awt.Label();
label20 = new java.awt.Label();
label21 = new java.awt.Label();
label22 = new java.awt.Label();
label23 = new java.awt.Label();
home1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

panel.setBackground(new java.awt.Color(185, 195, 216));


panel.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));
panel.setForeground(java.awt.Color.black);
panel.addAncestorListener(new javax.swing.event.AncestorListener() {
public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
panelAncestorAdded(evt);
}
public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
}
public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
}
});

label2.setAlignment(java.awt.Label.CENTER);
label2.setBackground(new java.awt.Color(185, 195, 216));
label2.setFont(new java.awt.Font("Century Schoolbook L", 1, 30)); // NOI18N
label2.setForeground(new java.awt.Color(13, 18, 33));
label2.setText("Maxino College");

label1.setFont(new java.awt.Font("Century Schoolbook L", 3, 18)); // NOI18N


label1.setForeground(java.awt.Color.black);
label1.setText("System's Capabilities:");

label4.setBackground(new java.awt.Color(185, 195, 216));


label4.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label4.setForeground(java.awt.Color.black);
label4.setText("The system of Rainfall Patterns in Selected areas of Bohol is capable of reading an existng
textfile of Bohol sites and also for entering \n ");

68
label5.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label5.setForeground(java.awt.Color.black);
label5.setText(" new textfile new sets of records entry. In the new data entry, it focuses on creating a
textfile, appending or adding records, ");

label7.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N


label7.setForeground(java.awt.Color.black);
label7.setText("modify records, and reading a textfile. The system is also capable for determining the
following:");

label8.setBackground(new java.awt.Color(185, 195, 216));


label8.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
label8.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label8.setForeground(java.awt.Color.black);
label8.setText("1. sum of all the rainfall for a period");

label9.setBackground(new java.awt.Color(185, 195, 216));


label9.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label9.setForeground(java.awt.Color.black);
label9.setText("2. total monthly mean for a period");

label10.setBackground(new java.awt.Color(185, 195, 216));


label10.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label10.setForeground(java.awt.Color.black);
label10.setText("3. total annual mean for a period");

label3.setBackground(new java.awt.Color(185, 195, 216));


label3.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label3.setForeground(java.awt.Color.black);
label3.setText("4. maximum rainfall for a period");

label11.setBackground(new java.awt.Color(185, 195, 216));


label11.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label11.setForeground(java.awt.Color.black);
label11.setText("5. first standard deviation for a period");

label12.setBackground(new java.awt.Color(185, 195, 216));


label12.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label12.setForeground(java.awt.Color.black);
label12.setText("6. second standard deviation for a period");

label13.setBackground(new java.awt.Color(185, 195, 216));


label13.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label13.setForeground(java.awt.Color.black);
label13.setText("7. third standard deviation for a period");

label14.setBackground(new java.awt.Color(185, 195, 216));


label14.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label14.setForeground(java.awt.Color.black);
label14.setText("8. number of frequency that exceeds the 1st standard deviation");

label15.setBackground(new java.awt.Color(185, 195, 216));


label15.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label15.setForeground(java.awt.Color.black);
label15.setText("9. number of frequency that exceeds the 2nd standard deviation");
label16.setBackground(new java.awt.Color(185, 195, 216));
label16.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label16.setForeground(java.awt.Color.black);
label16.setText("10. number of frequency that exceeds the 3rd standard deviation");

label17.setBackground(new java.awt.Color(185, 195, 216));


label17.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label17.setForeground(java.awt.Color.black);
label17.setText("11. total number of wet days for a period");

label18.setBackground(new java.awt.Color(185, 195, 216));


label18.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label18.setForeground(java.awt.Color.black);
label18.setText("12. total number of dry days for a period");

label19.setBackground(new java.awt.Color(185, 195, 216));


label19.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label19.setForeground(java.awt.Color.black);
label19.setText("13. total number fo consecutive wet days for a period");

label20.setBackground(new java.awt.Color(185, 195, 216));


label20.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label20.setForeground(java.awt.Color.black);
label20.setText("14. can browse a textfile from a specific location");

label21.setBackground(new java.awt.Color(185, 195, 216));


label21.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label21.setForeground(java.awt.Color.black);
label21.setText("15. graph the statistical data for a period using bar graph");

label22.setBackground(new java.awt.Color(185, 195, 216));


label22.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label22.setForeground(java.awt.Color.black);
label22.setText("16. can display the content records of a textfile for a period");

label23.setBackground(new java.awt.Color(185, 195, 216));


label23.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label23.setForeground(java.awt.Color.black);
label23.setText("17. can print out a hard copy of the textfile content");

home1.setBackground(new java.awt.Color(195, 202, 214));


home1.setFont(new java.awt.Font("Bitstream Charter", 0, 14)); // NOI18N
home1.setForeground(java.awt.Color.black);
home1.setText("BACK");
home1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
home1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
home1ActionPerformed(evt);
}
});

javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);


panel.setLayout(panelLayout);
panelLayout.setHorizontalGroup(
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()

70
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 351,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(299, 299, 299)
.addComponent(home1, javax.swing.GroupLayout.PREFERRED_SIZE, 52,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addGap(104, 104, 104)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label15, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label9, javax.swing.GroupLayout.PREFERRED_SIZE, 298,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label8, javax.swing.GroupLayout.PREFERRED_SIZE, 298,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, 298,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE, 298,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, 298,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, 298,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, 470,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label18, javax.swing.GroupLayout.PREFERRED_SIZE, 426,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, 426,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label19, javax.swing.GroupLayout.PREFERRED_SIZE, 426,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label20, javax.swing.GroupLayout.PREFERRED_SIZE, 426,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label21, javax.swing.GroupLayout.PREFERRED_SIZE, 426,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label22, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label23, javax.swing.GroupLayout.PREFERRED_SIZE, 426,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(71, 71, 71))))
.addGroup(panelLayout.createSequentialGroup()
.addGap(38, 38, 38)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE, 914,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, 1006,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE))
);
panelLayout.setVerticalGroup(
panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 37,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(home1))
.addGap(37, 37, 37)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(59, 59, 59)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label9, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label18, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label19, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(19, 19, 19)
.addComponent(label20, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))

72
.addComponent(label3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelLayout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(label21, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label22, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label23, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelLayout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(19, 19, 19)
.addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(62, Short.MAX_VALUE))
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void panelAncestorAdded(javax.swing.event.AncestorEvent evt) {//GEN-


FIRST:event_panelAncestorAdded
Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y); // TODO add your handling code here:


}//GEN-LAST:event_panelAncestorAdded

private void home1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_home1ActionPerformed
// TODO add your handling code here:
HOME hj = new HOME();
hj.setVisible(true);
setVisible(false);
}//GEN-LAST:event_home1ActionPerformed

public static void main(String args[]) {


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new system().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton home1;
private java.awt.Label label1;
private java.awt.Label label10;
private java.awt.Label label11;
private java.awt.Label label12;
private java.awt.Label label13;
private java.awt.Label label14;
private java.awt.Label label15;
private java.awt.Label label16;
private java.awt.Label label17;
private java.awt.Label label18;
private java.awt.Label label19;
private java.awt.Label label2;
private java.awt.Label label20;
private java.awt.Label label21;
private java.awt.Label label22;
private java.awt.Label label23;
private java.awt.Label label3;
private java.awt.Label label4;
private java.awt.Label label5;
private java.awt.Label label7;
private java.awt.Label label8;
private java.awt.Label label9;
private javax.swing.JPanel panel; }
Mission.java

package CCNCSCV.to.PPS;

/**
*
* @author temblor

74
*/
public class Mission extends javax.swing.JFrame {

public Mission() {
setResizable(false);
initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jScrollPane1 = new javax.swing.JScrollPane();


jPanel1 = new javax.swing.JPanel();
label2 = new java.awt.Label();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

label2.setAlignment(java.awt.Label.CENTER);
label2.setBackground(new java.awt.Color(185, 195, 216));
label2.setFont(new java.awt.Font("Bitstream Charter", 1, 20)); // NOI18N
label2.setForeground(new java.awt.Color(13, 18, 33));
label2.setText(" The Mission of Maxino College ");

jTextField1.setEditable(false);
jTextField1.setBackground(java.awt.Color.lightGray);
jTextField1.setFont(new java.awt.Font("Bitstream Charter", 0, 18)); // NOI18N
jTextField1.setText("To develop professionally, competent, morally guided, spiritually strong, politically
effective, service motivated and");

jTextField2.setEditable(false);
jTextField2.setBackground(java.awt.Color.lightGray);
jTextField2.setFont(new java.awt.Font("Bitstream Charter", 0, 18)); // NOI18N
jTextField2.setText("socially concerned Catholic lay leaders committed to the promotion of personal,
communitarian, and environmental development and growth.");
jTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed(evt);
}
});

jButton1.setText("HOME");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jLabel1.setIcon(new javax.swing.ImageIcon("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/
src/CCNCSCV/to/PPS/mis3.png")); // NOI18N

jLabel2.setIcon(new javax.swing.ImageIcon("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/
src/CCNCSCV/to/PPS/mis2.png")); // NOI18N

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.Alignment.TRAILING)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 527,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(1105, 1105, 1105)
.addComponent(jButton1)
.addGap(58, 58, 58)))
.addGap(0, 207, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel4)
.addGap(18, 18, 18)
.addComponent(jLabel3)
.addGap(55, 55, 55)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(429, 429, 429)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 492,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(193, 193, 193)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(32, 32, 32)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 664,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(749, Short.MAX_VALUE)))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton1)
.addGap(85, 85, 85)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING
)
.addComponent(jLabel3)
.addComponent(jLabel4)))
.addGroup(jPanel1Layout.createSequentialGroup()

76
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 42,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(23, 23, 23)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(34, 34, 34)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 457,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(174, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(182, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 457,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(173, 173, 173)))
);

jScrollPane1.setViewportView(jPanel1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1282,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 676,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jTextField2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:ls
HOME gh = new HOME();
gh.setVisible(true);
setVisible(false);
}//GEN-LAST:event_jButton1ActionPerformed

public static void main(String args[]) {


try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Mission.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Mission.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Mission.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Mission.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Mission().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private java.awt.Label label2;
// End of variables declaration//GEN-END:variables
}

vision.java

ackage CCNCSCV.to.PPS;

/**
*
* @author temblor
*/
public class vision extends javax.swing.JFrame {

public vision() {
setResizable(false);

78
initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jScrollPane1 = new javax.swing.JScrollPane();


jPanel1 = new javax.swing.JPanel();
label2 = new java.awt.Label();
jLabel3 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

label2.setAlignment(java.awt.Label.CENTER);
label2.setBackground(new java.awt.Color(185, 195, 216));
label2.setFont(new java.awt.Font("Bitstream Charter", 1, 20)); // NOI18N
label2.setForeground(new java.awt.Color(13, 18, 33));
label2.setText("The Vision of Maxino College");

jTextField1.setEditable(false);
jTextField1.setBackground(java.awt.Color.lightGray);
jTextField1.setFont(new java.awt.Font("Bitstream Charter", 0, 18)); // NOI18N
jTextField1.setText("Maxino College sees herself as a community of caring scholars, inspired by the
Roman Catholic faith, in the service of peoples,");
jTextField1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField1ActionPerformed(evt);
}
});

jTextField2.setEditable(false);
jTextField2.setBackground(java.awt.Color.lightGray);
jTextField2.setFont(new java.awt.Font("Bitstream Charter", 0, 18)); // NOI18N
jTextField2.setText("significantly contributing to personal, social, and structural transformations towards
a society of justice, love, and peace");
jTextField2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jTextField2ActionPerformed(evt);
}
});

jTextField3.setEditable(false);
jTextField3.setBackground(java.awt.Color.lightGray);
jTextField3.setFont(new java.awt.Font("Bitstream Charter", 0, 18)); // NOI18N
jTextField3.setText("as the Roman Catholic journeys home with the universe to the Creator.");

jButton1.setText("HOME");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jLabel2.setIcon(new javax.swing.ImageIcon("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/
src/CCNCSCV/to/PPS/mis1.png")); // NOI18N

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.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(300, 300, 300)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 506,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(115, 115, 115)
.addComponent(jButton1))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(81, 81, 81)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(61, 61, 61)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 969,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(243, 243, 243)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 582,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(97, 97, 97)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 949,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(292, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jButton1))
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 42,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(56, 56, 56)
.addComponent(jLabel3))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(28, 28, 28)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 38,

80
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 38,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel2)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

jScrollPane1.setViewportView(jPanel1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1116,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 731, Short.MAX_VALUE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jTextField2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField2ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:ls
HOME gh = new HOME();
gh.setVisible(true);
setVisible(false);
}//GEN-LAST:event_jButton1ActionPerformed

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jTextField1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField1ActionPerformed

public static void main(String args[]) {

try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(vision.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(vision.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(vision.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(vision.class.getName()).log(java.util.logging.Level.SEVERE, null,
ex);
}

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new vision().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
private java.awt.Label label2;
// End of variables declaration//GEN-END:variables
}

BoholMap.java

import java.awt.Dimension;
import java.awt.Toolkit;

/**
*
* @author temblor
*/
public class BoholMap extends javax.swing.JFrame {

/** Creates new form BoholMap */


public BoholMap() {
setUndecorated(true);
setResizable(false);
initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents

82
private void initComponents() {

panel1 = new java.awt.Panel();


label1 = new java.awt.Label();
jLabel1 = new javax.swing.JLabel();
button1 = new java.awt.Button();
button2 = new java.awt.Button();
panel2 = new java.awt.Panel();
label2 = new java.awt.Label();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
home = new javax.swing.JButton();
jLabel4 = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();

javax.swing.GroupLayout panel1Layout = new javax.swing.GroupLayout(panel1);


panel1.setLayout(panel1Layout);
panel1Layout.setHorizontalGroup(
panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
panel1Layout.setVerticalGroup(
panel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);

label1.setText("label1");

jLabel1.setText("jLabel1");

button1.setLabel("button1");

button2.setLabel("button2");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

panel2.setBackground(new java.awt.Color(185, 195, 216));

label2.setAlignment(java.awt.Label.CENTER);
label2.setBackground(new java.awt.Color(185, 195, 216));
label2.setFont(new java.awt.Font("Century Schoolbook L", 1, 20)); // NOI18N
label2.setForeground(java.awt.Color.black);
label2.setText("Map of Bohol, Negros Oriental");

home.setBackground(java.awt.Color.white);
home.setFont(new java.awt.Font("Trebuchet MS", 1, 13)); // NOI18N
home.setForeground(java.awt.Color.black);
home.setText("BACK");
home.setBorder(javax.swing.BorderFactory.createEtchedBorder());
home.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
homeActionPerformed(evt);
}
});

jLabel5.setIcon(new javax.swing.ImageIcon("/home/globiq/Desktop/THESIS_CLIMATE_TEMBLOR/
src/CCNCSCV/to/PPS/bohol.png")); // NOI18N
jLabel5.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));

javax.swing.GroupLayout panel2Layout = new javax.swing.GroupLayout(panel2);


panel2.setLayout(panel2Layout);
panel2Layout.setHorizontalGroup(
panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 499,
Short.MAX_VALUE)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 0,
Short.MAX_VALUE)))
.addGroup(panel2Layout.createSequentialGroup()
.addGap(85, 85, 85)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 394,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(8, 8, 8)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panel2Layout.createSequentialGroup()
.addGap(136, 136, 136)
.addComponent(jLabel2))
.addGroup(panel2Layout.createSequentialGroup()
.addGap(88, 88, 88)
.addComponent(jLabel3)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addComponent(home, javax.swing.GroupLayout.PREFERRED_SIZE, 79,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(127, 127, 127))
);
panel2Layout.setVerticalGroup(
panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(panel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panel2Layout.createSequentialGroup()
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 456,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel2)
.addGap(87, 87, 87))
.addGroup(panel2Layout.createSequentialGroup()
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, 43,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 442,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)

84
.addComponent(home)
.addGap(48, 48, 48))))
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, 564,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panel2, javax.swing.GroupLayout.PREFERRED_SIZE, 558,
javax.swing.GroupLayout.PREFERRED_SIZE)
);

pack();
}// </editor-fold>//GEN-END:initComponents

private void homeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_homeActionPerformed
// TODO add your handling code here:
HOME nj = new HOME();
nj.setVisible(true);
setVisible(false);
}//GEN-LAST:event_homeActionPerformed
private void panel2AncestorAdded(javax.swing.event.AncestorEvent evt) {
Dimension dim= Toolkit.getDefaultToolkit().getScreenSize();

int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;

this.setLocation(x,y); // TODO add your handling code here:


}

public static void main(String args[]) {


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new BoholMap().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private java.awt.Button button1;
private java.awt.Button button2;
private javax.swing.JButton home;
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 java.awt.Label label1;
private java.awt.Label label2;
private java.awt.Panel panel1;
private java.awt.Panel panel2;
// End of variables declaration//GEN-END:variables

count1.java

package CCNCSCV.to.PPS;

/**
*
* @author temblor
*/
public class count1 {
double Sum[]= new double[30];
int Freq[]= new int[30];
double sum[]= new double[12];
int freq[]= new int[12];
int year;
int f[]= new int[12];
double A[]= new double[12];
double num[]= new double[12];
count1(){
for(int i=0;i<12;i++){
freq[i]=0;
sum[i]=0;
f[i]=0;
num[i]=0;

}
for(int i=0;i<30;i++){
Freq[i]=0;
Sum[i]=0;
}
num[0]=31;
num[1]=28;
num[2]=31;
num[3]=30;
num[4]=31;
num[5]=30;
num[6]=31;
num[7]=31;
num[8]=30;
num[9]=31;
num[10]=30;
num[11]=31;
}
int year1,year2,last;
void old(int y1,int y2,int ld){
year=y1;
year1=y1;
year2=y2;
last=ld;

86
}
double allsum=0;

void old1(int y1){


year=y1;

// JOptionPane.showMessageDialog(null,year);
}
void month(String d, int cll1){
int bb=d.length();
String aa= d.substring(8,bb);
String cc= d.substring(4,7);
String ee= d.substring(0,4);
int ff=Integer.valueOf(ee);
int m=Integer.valueOf(cc);
double a=Double.valueOf(aa);
int ff1=Integer.valueOf(d.substring(0,7));

if(ff==1956){
Sum[0]=Sum[0]+a;
Freq[0]++;
}else if(ff==1957){
Sum[1]=Sum[1]+a;
Freq[1]++;
}else if(ff==1958){
Sum[2]=Sum[2]+a;
Freq[2]++;
}else if(ff==1959){
Sum[3]=Sum[3]+a;
Freq[3]++;
}else if(ff==1960){
Sum[4]=Sum[4]+a;
Freq[4]++;
}else if(ff==1961){
Sum[5]=Sum[5]+a;
Freq[5]++;
}else if(ff==1962){
Sum[6]=Sum[6]+a;
Freq[6]++;
}
else if(ff==1963){
Sum[7]=Sum[7]+a;
Freq[7]++;
}
else if(ff==1964){
Sum[8]=Sum[8]+a;
Freq[8]++;
}
else if(ff==1965){
Sum[9]=Sum[9]+a;
Freq[9]++;
}
else if(ff==1966){
Sum[10]=Sum[10]+a;
Freq[10]++;
}
else if(ff==1967){
Sum[11]=Sum[11]+a;
Freq[11]++;
}
else if(ff==1968){
Sum[12]=Sum[12]+a;
Freq[12]++;
}
else if(ff==1969){
Sum[13]=Sum[13]+a;
Freq[13]++;
}
else if(ff==1970){
Sum[14]=Sum[14]+a;
Freq[14]++;
}
else if(ff==1971){
Sum[15]=Sum[15]+a;
Freq[15]++;
}
else if(ff==1972){
Sum[16]=Sum[16]+a;
Freq[16]++;
}
else if(ff==1973){
Sum[17]=Sum[17]+a;
Freq[17]++;
}
else if(ff==1974){
Sum[18]=Sum[18]+a;
Freq[18]++;
}
else if(ff==1975){
Sum[19]=Sum[19]+a;
Freq[19]++;
}
else if(ff==1976){
Sum[20]=Sum[20]+a;
Freq[20]++;
}
else if(ff==1977){
Sum[21]=Sum[21]+a;
Freq[21]++;
}
else if(ff==1978){
Sum[22]=Sum[22]+a;
Freq[22]++;
}
else if(ff==1979){
Sum[23]=Sum[23]+a;
Freq[23]++;
}
else if(ff==1980){
Sum[24]=Sum[24]+a;
Freq[24]++;

88
}
else if(ff==1981){
Sum[25]=Sum[25]+a;
Freq[25]++;
}
else if(ff==1982){
Sum[26]=Sum[26]+a;
Freq[26]++;
}
else if(ff==1983){
Sum[27]=Sum[27]+a;
Freq[27]++;
}
else if(ff==1984){
Sum[28]=Sum[28]+a;
Freq[28]++;
}

else{
Sum[29]=Sum[29]+a;
Freq[29]++;
}

if(year1!=year2){

if(cll1!=year){
year=cll1;

for(int i=0;i<12;i++){
if(f[i]==num[i]){
allsum=allsum+A[i];
}
A[i]=0;
f[i]=0;
}

}}

if((m<=31)&&(m>=1)){
sum[0]=sum[0]+a;
f[0]=f[0]+1;
A[0]=A[0]+a;
freq[0]++;
}else if((m<=59)&&(m>=32)){
sum[1]=sum[1]+a;

f[1]=f[1]+1;
A[1]=A[1]+a;
freq[1]++;

}else if((m<=90)&&(m>=60)){
sum[2]=sum[2]+a;
f[2]=f[2]+1;
A[2]=A[2]+a;
freq[2]++;
}else if((m<=120)&&(m>=91)){
sum[3]=sum[3]+a;
f[3]=f[3]+1;
A[3]=A[3]+a;
freq[3]++;

}
else if((m<=151)&&(m>=121)){
sum[4]=sum[4]+a;

f[4]=f[4]+1;
A[4]=A[4]+a;
freq[4]++;
}
else if((m<=181)&&(m>=152)){
sum[5]=sum[5]+a;

f[5]=f[5]+1;
A[5]=A[5]+a;
freq[5]++;
}
else if((m<=212)&&(m>=182)){
sum[6]=sum[6]+a;

f[6]=f[6]+1;
A[6]=A[6]+a;
freq[6]++;
} else if((m<=243)&&(m>=213)){
sum[7]=sum[7]+a;

f[7]=f[7]+1;
A[7]=A[7]+a;
freq[7]++;
} else if((m<=273)&&(m>=244)){
sum[8]=sum[8]+a;

f[8]=f[8]+1;
A[8]=A[8]+a;
freq[8]++;

} else if((m<=304)&&(m>=274)){
sum[9]=sum[9]+a;

f[9]=f[9]+1;
A[9]=A[9]+a;
freq[9]++;
} else if((m<=334)&&(m>=305)){
sum[10]=sum[10]+a;

f[10]=f[10]+1;
A[10]=A[10]+a;
freq[10]++;

} else if((m<=365)&&(m>=335)){
sum[11]=sum[11]+a;

90
f[11]=f[11]+1;
A[11]=A[11]+a;
freq[11]++;
}
if(ff1==last){

for(int i=0;i<12;i++){
if(f[i]==num[i]){
allsum=allsum+A[i];
}
A[i]=0;
f[i]=0;
}

}
double[] rsum(){
return sum;
}
int[] rcount(){
return freq;
}
double[] Rsum(){
return Sum;
}
int[] Rcount(){
return Freq;
}
double al(){
return allsum;
}

consecutive1.java

package CCNCSCV.to.PPS;

import java.io.FileNotFoundException;
import java.text.DecimalFormat;
import java.util.Formatter;

/**
*
* @author temblor
*/
public class consecutive1 {
consecutive head=null,tail=head,next;
int date;
double data;
String rain;
String from,to;

consecutive1(String d)// node class Constructor.


{
rain = d;
next= null;

void push(String r){

consecutive newNode= new consecutive(r);


if(head ==null){
head=newNode;
tail=head;}
else{
tail.next=newNode;// inserting element
tail = newNode;
}

}
String Rfrom(){
return from;
}
String Rto(){
return to;
}
int Date1(String f) throws FileNotFoundException{
Formatter output;
int COunt=0;
int max=0;
DecimalFormat df= new DecimalFormat("#.##");
output = new Formatter(f);
int freq1=0,freq_con=0,i=1,bb,co;
double sum_con=0;
consecutive prev=null;
consecutive temps=null;
for( temps = head;temps.next!=null;temps=temps.next){
int dte1=Integer.valueOf(temps.rain.substring(0,7));
int dte2= Integer.valueOf(temps.next.rain.substring(0,7));

if(dte1+1!=dte2){
freq1=freq_con;

if(freq_con>=4){

COunt++;
sum_con=0;
int j=0,freq=freq1;
consecutive temp;
co=0;
for(temp=prev;temp!=temps.next;temp=temp.next){
output.format(temp.rain);
output.format("\n");
bb=temp.rain.length();
String cut=temp.rain.substring(8,bb);
double convrt=Double.valueOf(cut);
sum_con=sum_con+convrt;

92
freq--;
co++;

}
if(co>max){
max=co;
from=prev.rain;
to=temps.rain;
}

sum_con = Double.parseDouble(df.format(sum_con));
output.format(String.valueOf("sum="+sum_con));
output.format("\n\n");
temp=null;

}
freq_con=0;
}else{
freq_con=freq_con+1;
if(freq_con==1){
prev=temps;
}
}
i++;

}
if(freq_con>=4){

COunt++;
sum_con=0;
int j=0,freq=freq1;
consecutive temp=head;
int freq2=freq-1;
co=0;
for(temp=prev;temp!=temps.next;temp=temp.next){
co++;
output.format(temp.rain);
output.format("\n");
bb=temp.rain.length();
String cut=temp.rain.substring(8,bb);
double convrt=Double.valueOf(cut);
sum_con=sum_con+convrt;
freq--;

}
if(co>max){
max=co;
from=prev.rain;
to=temps.rain;
}

sum_con = new Double(df.format(sum_con)).doubleValue();


output.format(String.valueOf(sum_con));
output.format("\n\n");
temp=null;

}
freq_con=0;

output.close();
return COunt;
}}
createFiletoPrint.java

package CCNCSCV.to.PPS;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
*
* @author temblor
*/
public class createFiletoPrint extends javax.swing.JFrame {

public createFiletoPrint() {
setResizable(false);
setUndecorated(true);
setSize(700,400);
initComponents();
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

jPanel1 = new javax.swing.JPanel();


jButton1 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
filename = new javax.swing.JTextField();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBackground(new java.awt.Color(185, 195, 216));


jPanel1.setBorder(new javax.swing.border.LineBorder(java.awt.Color.white, 2, true));

jButton1.setFont(new java.awt.Font("DejaVu Sans Mono", 1, 15)); // NOI18N


jButton1.setForeground(new java.awt.Color(21, 26, 27));
jButton1.setText("BACK");

jButton1.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))
;
jButton1.addActionListener(new java.awt.event.ActionListener() {

94
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jLabel1.setFont(new java.awt.Font("DejaVu Sans Mono", 1, 16)); // NOI18N


jLabel1.setForeground(java.awt.Color.black);
jLabel1.setText("Create Filename for your file to be printed out:");

jLabel2.setFont(new java.awt.Font("Bitstream Charter", 1, 30)); // NOI18N


jLabel2.setForeground(java.awt.Color.black);
jLabel2.setText("Printing Out a File");

filename.setFont(new java.awt.Font("Bitstream Charter", 0, 17)); // NOI18N


filename.setForeground(new java.awt.Color(28, 97, 173));

filename.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))
;
filename.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
filenameActionPerformed(evt);
}
});

jButton2.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jButton2.setForeground(new java.awt.Color(7, 25, 28));
jButton2.setText("Reset");

jButton2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))
;
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

jButton3.setFont(new java.awt.Font("DejaVu Sans", 1, 15)); // NOI18N


jButton3.setForeground(new java.awt.Color(9, 27, 30));
jButton3.setText("Save");

jButton3.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED))
;
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);


jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(160, 160, 160)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 63,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 64,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGap(0, 133, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 480,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addGap(108, 108, 108))))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 292,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(206, 206, 206))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jButton1)
.addGap(60, 60, 60)
.addComponent(jLabel2)
.addGap(60, 60, 60)
.addComponent(jLabel1)
.addGap(9, 9, 9)
.addComponent(filename, javax.swing.GroupLayout.PREFERRED_SIZE, 32,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(35, 35, 35)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(60, Short.MAX_VALUE))
);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());


getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);

96
pack();
}// </editor-fold>//GEN-END:initComponents

public int check(String b){


int bb,c,yes = 0;
String ee,DD=".txt";
boolean com;

bb=b.length();
if(bb>4){
c=bb-4;
ee = b.substring(c,bb);
com =ee.equals(DD);
if(com==false){
JOptionPane.showMessageDialog(null,"Not a Text File! Make sure to have a '.text' file name extension.");
yes=0;
}else{
yes=1;

}
}else{
JOptionPane.showMessageDialog(null,"Please input a file name!");
}
return yes;
}

private void filenameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_filenameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_filenameActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton2ActionPerformed
filename.setText("");
}//GEN-LAST:event_jButton2ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton3ActionPerformed
int pwd;
pwd=check(filename.getText());
if(pwd==1){

preview g=new preview();


g.setVisible(true);
try {
g.Visible(filename.getText());
setVisible(false);

} catch (IOException ex) {


Logger.getLogger(createFiletoPrint.class.getName()).log(Level.SEVERE, null, ex);
}
}else{
filename.setText("");
}
}//GEN-LAST:event_jButton3ActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-


FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
final_read ert = new final_read();
ert.setVisible(true);
setVisible(false);
}//GEN-LAST:event_jButton1ActionPerformed
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(createFiletoPrint.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(createFiletoPrint.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(createFiletoPrint.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(createFiletoPrint.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);
}

java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new createFiletoPrint().setVisible(true);
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables


private javax.swing.JTextField filename;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
}

process1.java

package CCNCSCV.to.PPS;

98
/**
*
* @author temblor
*/
public class process1 {
int month,day,year;
double data;
int date;

public process1(){
month=0;
day=0;
year=0;
}
public process1(int d, int m,int y)
{
month=m;
day=d;
year=y;
}
public process1(int mon, int da)
{
month=mon;
day=da;
}

int convert(int mm,int dd,int yy){


int cc,ii;
if(mm==1){
cc=1;
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;

}
}else if(mm==2){
cc=32;
for(ii=1;ii<=28;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==3){
cc=60;
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==4){
cc=91;
for(ii=1;ii<=30;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==5){
cc=121;
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==6){
cc=152;
for(ii=1;ii<=30;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==7){
cc=182;
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==8){
cc=213;
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==9){
cc=244;
for(ii=1;ii<=30;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==10){
cc=274;

100
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==11){
cc=305;
for(ii=1;ii<=30;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}
else if(mm==12){
cc=335;
for(ii=1;ii<=31;ii++){
if(dd==ii){
day=cc;
}
cc++;
}
}

return yy+day;
}

Node.java

package CCNCSCV.to.PPS;

/**
*
* @author temblor
*/
public class Node {

double data;
Node next;
Node head=null,tail=head;
int size=0;

Node temp;
Node(double d)
{
data = d;
next= null;
}
int push(double data){

Node newNode= new Node(data);


if(head ==null){
head=newNode;
tail=head;}
else{
tail.next=newNode;
tail = newNode;
}
size++;
return size; }

double sum(){
double total=0;
if(size>0){
for(Node temps = head;temps!=null;temps=temps.next)
total=total+temps.data;
}
return total;
}

double GetS3(double mean){


double s1,s2=0,s3;

for(temp=head;temp!=null;temp=temp.next){
s1=(temp.data-mean)*(temp.data-mean);
s2=s2+s1;
}
s3=s2/size;
return s3;
}

int Fdeviation(double mean){


int f=0;
double s3=GetS3(mean);
for(temp=head;temp!=null;temp=temp.next){
if((temp.data-mean)>=Math.sqrt(s3)){
f++;
}
}
return f;
}
int Sdeviation(double mean){
int f1=0;
double s3=GetS3(mean);
for(temp=head;temp!=null;temp=temp.next){
if((temp.data-mean)>=(Math.sqrt(s3)*2)){ f1++;}

}
return f1;
}
int Tdeviation(double mean){
int f2=0;
double s3=GetS3(mean);
for(temp=head;temp!=null;temp=temp.next){

102
if((temp.data-mean)>=(Math.sqrt(s3)*3)){f2++; }
}
return f2;
}
int freqExtreme(double mean){
double s3=GetS3(mean);
int f3=0;
for(temp=head;temp!=null;temp=temp.next){
if(temp.data >(Math.sqrt(s3)*3)){ f3++;}
}
return f3;
}

double stdeviation(double mean){

double s3=GetS3(mean);
return Math.sqrt(s3);
}
double stdeviation2(double mean){
double s3=GetS3(mean);

return Math.sqrt(s3)*2;
}
double stdeviation3(double mean){
double s3=GetS3(mean);

return Math.sqrt(s3)*3;

double Max(){

double max=head.data;
for(temp=head.next;temp!=null;temp=temp.next){
if(temp.data>max){
max=temp.data;

}
return max;
}

double Min(){

double min=head.data;
for(temp=head.next;temp!=null;temp=temp.next){
if(temp.data<min){
min=temp.data;

}
return min;
}
}
104

You might also like