Codes
Codes
Codes
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() {
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.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);
}
});
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
2
});
helpMenu.add(exitMenuItem1);
menuBar.add(helpMenu);
jCheckBoxMenuItem1.setSelected(true);
jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1");
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("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));
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));
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));
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
menuBar1.add(helpMenu1);
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
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);
}
});
menuBar1.add(fileMenu2);
menuBar1.add(helpMenu2);
setJMenuBar(menuBar1);
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
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
int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;
int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;
}//GEN-LAST:event_menuBar1AncestorAdded
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) {
}//GEN-LAST:event_menu2ActionPerformed
}//GEN-LAST:event_exitMenuItem5ActionPerformed
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
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>
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() {
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);
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);
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);
}
});
16
label6.setForeground(java.awt.Color.black);
label6.setText("Maximum Rainfall");
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.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);
}
});
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);
}
});
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.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED
, null, new java.awt.Color(239, 216, 216), java.awt.Color.lightGray, null));
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.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED,
null, new java.awt.Color(239, 216, 216), java.awt.Color.lightGray, null));
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);
}
});
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);
}
});
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.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);
}
});
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);
}
});
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.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));
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));
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))
);
pack();
}// </editor-fold>//GEN-END:initComponents
34
}//GEN-LAST:event_homeActionPerformed
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");
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;
}//GEN-LAST:event_Fstd1ActionPerformed
}//GEN-LAST:event_Fstd2ActionPerformed
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
}
}
}//GEN-LAST:event_boholActionPerformed
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
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
try {
in = new BufferedReader(new FileReader(filea));
Act();
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
filea=filename.getText();
if (returnVal == JFileChooser.CANCEL_OPTION) {
filename.setText("");
}
}//GEN-LAST:event_browseActionPerformed
int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;
int i;
XYSeriesCollection dataset = new XYSeriesCollection();
XYSeries series1;
series1 = new XYSeries(filea);
}//GEN-LAST:event_monthlyActionPerformed
dataset.addSeries(series1);
40
PlotOrientation.VERTICAL, showLegend, createTooltip, createURL);
XYPlot plot = chart.getXYPlot();
XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
plot.setRenderer(renderer);
}
}
}//GEN-LAST:event_bohol1ActionPerformed
}//GEN-LAST:event_printoutActionPerformed
out.format("\n\n"+ view.getText()+"\n\n");
}
}
}//GEN-LAST:event_read2ActionPerformed
Formatter totalOutput;
String forview;
double meantotal;
count1 mn;
Formatter out;
double [] MONTHLY=new double[12];
double [] YEARLY=new double[30];
42
mn=new count1();
Formatter output1,output2,output3,output4,output5,output6,output7;
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));
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);
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();
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)));
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")));
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() {
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);
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);
}
});
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");
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");
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.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.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.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);
}
});
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))
);
pack();
}// </editor-fold>//GEN-END:initComponents
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
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();
}
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
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
}//GEN-LAST:event_readActionPerformed
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) {
}//GEN-LAST:event_read1ActionPerformed
60
} catch (IOException ex) {
}
}
}//GEN-LAST:event_read2ActionPerformed
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);
}
});
}
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 {
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
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");
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);
}
});
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.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);
}
});
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))
);
pack();
}// </editor-fold>//GEN-END:initComponents
int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;
if (returnVal == JFileChooser.CANCEL_OPTION) {
filename.setText("");
display.setText("");
}
}//GEN-LAST:event_browseActionPerformed
String b=filename.getText();
File file = null;
Runtime rs = Runtime.getRuntime();
66
FIRST:event_home1ActionPerformed
// TODO add your handling code here:
NewJFrame5 hj = new NewJFrame5();
hj.setVisible(true);
setVisible(false);
}//GEN-LAST:event_home1ActionPerformed
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);
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");
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, ");
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))
);
pack();
}// </editor-fold>//GEN-END:initComponents
int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;
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() {
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
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);
pack();
}// </editor-fold>//GEN-END:initComponents
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Mission().setVisible(true);
}
});
}
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() {
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
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);
pack();
}// </editor-fold>//GEN-END:initComponents
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);
}
});
}
BoholMap.java
import java.awt.Dimension;
import java.awt.Toolkit;
/**
*
* @author temblor
*/
public class BoholMap extends javax.swing.JFrame {
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
82
private void initComponents() {
label1.setText("label1");
jLabel1.setText("jLabel1");
button1.setLabel("button1");
button2.setLabel("button2");
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("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));
84
.addComponent(home)
.addGap(48, 48, 48))))
);
pack();
}// </editor-fold>//GEN-END:initComponents
int w,h,x,y;
w=this.getSize().width;
h=this.getSize().height;
x=(dim.width-w)/2;
y=(dim.height-h)/2;
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;
// 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;
}
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;
}
}
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() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
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);
}
});
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.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.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);
}
});
96
pack();
}// </editor-fold>//GEN-END:initComponents
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;
}
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);
}
});
}
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;
}
}
}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){
double sum(){
double total=0;
if(size>0){
for(Node temps = head;temps!=null;temps=temps.next)
total=total+temps.data;
}
return total;
}
for(temp=head;temp!=null;temp=temp.next){
s1=(temp.data-mean)*(temp.data-mean);
s2=s2+s1;
}
s3=s2/size;
return s3;
}
}
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 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