Wednesday, October 6

Love's diary Writer



package lovesdiarywriter;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.GraphicsEnvironment;
import java.awt.Toolkit;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JColorChooser;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
/////////////////////////////////My Frame Class////////////////////////////
public class NewJFrame extends javax.swing.JFrame {
Date date =new Date();
Font f;
Color c;
String s,t;
int i,j,k,foundwords;
///////////////////////////My Frame Constructor////////////////////////////
public NewJFrame() {
initComponents();
}
/////////////////////////Counting User Specified Words Function////////////
public void countselectedwords()
{
foundwords=0;
t= jTextArea1.getSelectedText();
s=jTextArea1.getText();
for(i=0;i if(t.charAt(0)==s.charAt(i)) {
k=i;
for(j=0;j if(t.charAt(j)==s.charAt(k)) {
k++;
} else {
break;
}
}
if(j==t.length()) {
foundwords++;
}
}
}
}
///////////////////////////Replacing Word Function/////////////////////////
public void replacewords()
{
foundwords=0;
t= jTextField2.getText();
s=jTextArea1.getText();
for(i=0;i if(t.charAt(0)==s.charAt(i)) {
k=i;
for(j=0;j if(t.charAt(j)==s.charAt(k)) {
k++;
} else {
break;
}
}
if(j==t.length()) {
foundwords++;
jTextArea1.replaceRange(jTextField1.getText(), k-t.length(),k);
}
}
}
}
/////////////////////////Opening Notepad File Function/////////////////////
public void openFile() throws IOException {
JFileChooser jfc = new JFileChooser();
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
jfc.setFileFilter(jfc.getFileFilter());
int result = jfc.showOpenDialog(this);
if (result == JFileChooser.CANCEL_OPTION) {
return;
} else {
try {
FileReader frdr = new FileReader(jfc.getSelectedFile());
BufferedReader brdr = new BufferedReader(frdr);
String s ="";
int c = brdr.read();
while (c != -1) {
s=s+(char)c;
jTextArea1.setText(s);
c = brdr.read();
}
brdr.close();
frdr.close();
} catch (FileNotFoundException e) {
Toolkit.getDefaultToolkit().beep();
JOptionPane.showMessageDialog(this, "Error while loading the file", "ERROR", JOptionPane.ERROR_MESSAGE);
} catch (IOException ex) {
}
}
}
////////////////////////////////Saving File Function//////////////////////////
public void saveFile() {
JFileChooser jfc = new JFileChooser("C:\\");
jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
int result = jfc.showSaveDialog(this);
if (result == JFileChooser.CANCEL_OPTION) {
return;
} else {
try {
FileOutputStream fos = new FileOutputStream(jfc.getSelectedFile()+ ".rtf");
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write(jTextArea1.getText().getBytes());
bos.flush();
fos.close();
} catch (Exception e)
{
JOptionPane.showMessageDialog(this, "Error while saving file!", "Error", JOptionPane.ERROR_MESSAGE);
}
}
}
//////////////////////////////Saving Diary File///////////////////////////////
public void saveDiaryFile(String fileContent,String filePath)
{
try{
FileOutputStream fos = new FileOutputStream(filePath+".rtf");
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write(fileContent.getBytes());
bos.flush();
fos.close();
} catch(Exception ae)
{
JOptionPane.showMessageDialog(this, "Error while saving file!", "Error", JOptionPane.ERROR_MESSAGE);
}
}
////////////////////////////Opening Diary File////////////////////////////////
public String openDiaryFile(String filepath)
{
try
{
FileReader frdr = new FileReader(filepath+".rtf");
BufferedReader brdr = new BufferedReader(frdr);
s ="";
int c = brdr.read();
while (c != -1) {
s=s+(char)c;
c = brdr.read();
}
brdr.close();
frdr.close();
} catch (FileNotFoundException e) {} catch (IOException ex) {}
return s;
}
///////////////////////////////////Counting words/////////////////////////////
void count_word()
{
foundwords=0;j=0;
s=jTextArea1.getText();
if(s.length()==0){}
else
{
while(j!=s.length()-1)
{
if(s.charAt(j)!=' ' & s.charAt(j+1)==' ')
{foundwords++;}
j++;
};
if(s.charAt(j)!=' ')
foundwords ++;
}
}
void sentence_Case()
{ String u;
char c; //prem is a good boy. he is sexy too. Oh! my god? Cry baby.
j=0;
s=jTextArea1.getSelectedText().toLowerCase();
t="";
while(j!=s.length()-1)
{
if(j<3){}
else{
if(s.charAt(j-2)=='.' & s.charAt(j-1)!=' ')
{
u=String.valueOf(s.charAt(j));
u.toUpperCase();
t+=u;
}
else t+=s.charAt(j);
}
j++;
}
jTextArea1.replaceSelection(t);
}
@SuppressWarnings("unchecked")
//
private void initComponents() {

jPanel1 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
jScrollPane1 = new javax.swing.JScrollPane();
jList1 = new javax.swing.JList();
jButton1 = new javax.swing.JButton();
jScrollPane2 = new javax.swing.JScrollPane();
jTextArea1 = new javax.swing.JTextArea();
jLabel1 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
jSlider1 = new javax.swing.JSlider();
jLabel5 = new javax.swing.JLabel();
jComboBox2 = new javax.swing.JComboBox();
jComboBox3 = new javax.swing.JComboBox();
jComboBox4 = new javax.swing.JComboBox();
jTextField1 = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jTextField3 = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
jLabel9 = new javax.swing.JLabel();
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel5 = new javax.swing.JPanel();
jScrollPane6 = new javax.swing.JScrollPane();
jList5 = new javax.swing.JList();
jComboBox1 = new javax.swing.JComboBox();
jRadioButton4 = new javax.swing.JRadioButton();
jRadioButton5 = new javax.swing.JRadioButton();
jPanel4 = new javax.swing.JPanel();
jLabel10 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jLabel11 = new javax.swing.JLabel();
jRadioButton1 = new javax.swing.JRadioButton();
jRadioButton2 = new javax.swing.JRadioButton();
jRadioButton3 = new javax.swing.JRadioButton();
jButton2 = new javax.swing.JButton();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
jMenuItem3 = new javax.swing.JMenuItem();
jMenuItem4 = new javax.swing.JMenuItem();
jMenuItem5 = new javax.swing.JMenuItem();
jMenu2 = new javax.swing.JMenu();
jMenuItem6 = new javax.swing.JMenuItem();
jMenuItem7 = new javax.swing.JMenuItem();
jMenuItem8 = new javax.swing.JMenuItem();
jMenuItem9 = new javax.swing.JMenuItem();
jMenuItem10 = new javax.swing.JMenuItem();
jMenuItem11 = new javax.swing.JMenuItem();
jMenuItem12 = new javax.swing.JMenuItem();
jMenu4 = new javax.swing.JMenu();
jMenuItem21 = new javax.swing.JMenuItem();
jMenuItem22 = new javax.swing.JMenuItem();
jMenuItem13 = new javax.swing.JMenuItem();
jMenu3 = new javax.swing.JMenu();
jMenuItem14 = new javax.swing.JMenuItem();
jMenuItem15 = new javax.swing.JMenuItem();
jMenuItem23 = new javax.swing.JMenuItem();
jMenuItem24 = new javax.swing.JMenuItem();
jMenuItem28 = new javax.swing.JMenuItem();
jMenuItem16 = new javax.swing.JMenuItem();
jMenuItem19 = new javax.swing.JMenuItem();
jMenu5 = new javax.swing.JMenu();
jMenuItem17 = new javax.swing.JMenuItem();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Prem's Diary Writer.....");

jPanel1.setBackground(new java.awt.Color(255, 153, 160));

jLabel2.setText("jLabel1");

jList1.setBackground(new java.awt.Color(255, 153, 204));
jList1.setModel(new javax.swing.AbstractListModel() {
String[] strings = { "_______", "5:00 AM", "5:30 AM", "6:00 AM", "6:30 AM", "7:00 AM", "7:30 AM", "8:00 AM", "8:30 AM", "9:00 AM", "9:30 AM", "10:00 AM", "10:30 AM", "11:00 AM", "11:30 AM", "________", "12:00 PM", "12:30 PM", "1:00 PM", "1:30 PM", "2:00 PM", "2:30 PM", "3:00 PM", "3:30 PM", "4:00 PM", "4:30 PM", "5:00 PM", "5:30 PM", "_______", "6:00 PM", "6:30 PM", "7:00 PM", "7:30 PM", "8:00 PM", "8:30 PM", "9:00 PM", "9:30 PM", "10:00 PM", "10:30 PM", "11:00 PM", "11:30 PM", "12:00 AM", "________", "12:30 AM", "1:00 AM", "1:30 AM", "2:00 AM", "2:30 AM", "3:00 AM", "3:30 AM", "4:00 AM", "4:30 AM", " " };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
jList1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jList1MouseClicked(evt);
}
});
jList1.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
jList1ValueChanged(evt);
}
});
jScrollPane1.setViewportView(jList1);

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

jTextArea1.setBackground(new java.awt.Color(211, 223, 211));
jTextArea1.setColumns(20);
jTextArea1.setFont(new java.awt.Font("Arial", 0, 24)); // NOI18N
jTextArea1.setRows(5);
jTextArea1.addCaretListener(new javax.swing.event.CaretListener() {
public void caretUpdate(javax.swing.event.CaretEvent evt) {
jTextArea1CaretUpdate(evt);
}
});
jTextArea1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseDragged(java.awt.event.MouseEvent evt) {
jTextArea1MouseDragged(evt);
}
});
jScrollPane2.setViewportView(jTextArea1);

jLabel1.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel1.setText("Characters:");

jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel3.setText("Lines:");

jLabel4.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel4.setText("Selected Text:");

jSlider1.setBackground(new java.awt.Color(255, 153, 204));
jSlider1.setValue(24);
jSlider1.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jSlider1StateChanged(evt);
}
});

jLabel5.setText("24 %");

jComboBox2.setBackground(new java.awt.Color(255, 153, 204));
jComboBox2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Arial", " " }));
jComboBox2.setPreferredSize(new java.awt.Dimension(20, 20));
jComboBox2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jComboBox2MouseClicked(evt);
}
public void mouseEntered(java.awt.event.MouseEvent evt) {
jComboBox2MouseEntered(evt);
}
});
jComboBox2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox2ActionPerformed(evt);
}
});

jComboBox3.setBackground(new java.awt.Color(255, 153, 204));
jComboBox3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Regular", "Bold", "Italic", "Underline", "Bold + Italic", "Bold + Underline", "Italic + Underline", " ", " ", " " }));
jComboBox3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox3ActionPerformed(evt);
}
});

jComboBox4.setBackground(new java.awt.Color(255, 153, 204));
jComboBox4.setEditable(true);
jComboBox4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jComboBox4.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "24", "5", "8", "10", "11", "12", "13", "14", "15", "16", "18", "20", "22", "24", "26", "30", "32", "48", "56", "72" }));
jComboBox4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox4ActionPerformed(evt);
}
});

jTextField1.setBackground(new java.awt.Color(255, 153, 204));

jLabel6.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel6.setText("Find:");

jLabel7.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel7.setText("Replace");

jTextField2.setBackground(new java.awt.Color(255, 153, 204));

jTextField3.setBackground(new java.awt.Color(255, 153, 204));

jLabel8.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel8.setText("With");

jLabel9.setFont(new java.awt.Font("Tahoma", 0, 14));
jLabel9.setText("Words");
jLabel9.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(java.awt.event.MouseEvent evt) {
jLabel9MouseEntered(evt);
}
});

jTabbedPane1.setBackground(new java.awt.Color(255, 153, 204));

jPanel5.setBackground(new java.awt.Color(255, 153, 204));

jList5.setBackground(new java.awt.Color(255, 153, 204));
jList5.setModel(new javax.swing.AbstractListModel() {
String[] strings = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" };
public int getSize() { return strings.length; }
public Object getElementAt(int i) { return strings[i]; }
});
jList5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jList5MouseClicked(evt);
}
});
jScrollPane6.setViewportView(jList5);

jComboBox1.setBackground(new java.awt.Color(255, 153, 204));
jComboBox1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }));

jRadioButton4.setBackground(new java.awt.Color(255, 153, 204));
jRadioButton4.setSelected(true);
jRadioButton4.setText("Save Mode");
jRadioButton4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton4MouseClicked(evt);
}
});

jRadioButton5.setBackground(new java.awt.Color(255, 153, 204));
jRadioButton5.setText("Open Mode");
jRadioButton5.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton5MouseClicked(evt);
}
});

javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jRadioButton4)
.addContainerGap(85, Short.MAX_VALUE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jRadioButton5)
.addContainerGap(83, Short.MAX_VALUE))
.addGroup(jPanel5Layout.createSequentialGroup()
.addComponent(jComboBox1, 0, 160, Short.MAX_VALUE)
.addContainerGap())
.addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jRadioButton4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jRadioButton5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 464, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

jTabbedPane1.addTab("Date", jPanel5);

jPanel4.setBackground(new java.awt.Color(255, 153, 204));
jPanel4.setBorder(javax.swing.BorderFactory.createEtchedBorder());

jLabel10.setText("INFORMATION PANEL");

jLabel11.setText("...");

javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGap(19, 19, 19)
.addComponent(jLabel10)
.addContainerGap(46, Short.MAX_VALUE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE)
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel11, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
.addContainerGap())
);

jRadioButton1.setBackground(new java.awt.Color(255, 153, 204));
jRadioButton1.setText("Text File");
jRadioButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton1MouseClicked(evt);
}
});
jRadioButton1.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
jRadioButton1StateChanged(evt);
}
});

jRadioButton2.setBackground(new java.awt.Color(255, 153, 204));
jRadioButton2.setText("Text Diary");
jRadioButton2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton2MouseClicked(evt);
}
});

jRadioButton3.setBackground(new java.awt.Color(255, 153, 204));
jRadioButton3.setSelected(true);
jRadioButton3.setText("Encrypted Diary");
jRadioButton3.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton3MouseClicked(evt);
}
});

jButton2.setBackground(new java.awt.Color(255, 153, 204));
jButton2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
jButton2.setText("SAVE");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addComponent(jLabel1)
.addGap(88, 88, 88)
.addComponent(jLabel3)
.addGap(80, 80, 80)
.addComponent(jLabel4)
.addGap(66, 66, 66)
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 95, Short.MAX_VALUE)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(4, 4, 4))
.addGroup(jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 816, Short.MAX_VALUE))))
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
.addGap(264, 264, 264)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel7)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(6, 6, 6)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jRadioButton1)
.addGap(18, 18, 18)
.addComponent(jRadioButton2)
.addGap(18, 18, 18)
.addComponent(jRadioButton3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 110, Short.MAX_VALUE)
.addComponent(jLabel2)))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel2)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)
.addComponent(jRadioButton1)
.addComponent(jRadioButton2)
.addComponent(jRadioButton3)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jButton2))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 595, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 782, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(jLabel1)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel9))
.addGap(7, 7, 7))
.addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 872, Short.MAX_VALUE)
);

jMenuBar1.setPreferredSize(new java.awt.Dimension(120, 21));

jMenu1.setText("File");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));
jMenuItem1.setText("New");
jMenu1.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
jMenuItem2.setText("Open");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
jMenuItem3.setText("Save");
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem3);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));
jMenuItem4.setText("Save As...");
jMenu1.add(jMenuItem4);

jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK));
jMenuItem5.setText("Exit");
jMenu1.add(jMenuItem5);

jMenuBar1.add(jMenu1);

jMenu2.setText("Edit");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
jMenuItem6.setText("Cut");
jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem6ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem6);
jMenu2.add(jMenuItem7);

jMenuItem8.setText("Paste");
jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem8ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem8);

jMenuItem9.setText("Undo");
jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem9ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem9);

jMenuItem10.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK));
jMenuItem10.setText("Redo");
jMenu2.add(jMenuItem10);

jMenuItem11.setText("Select All");
jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem11ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem11);

jMenuItem12.setText("Delete");
jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem12ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem12);

jMenuBar1.add(jMenu2);

jMenu4.setText("Format");
jMenu4.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenu4MouseClicked(evt);
}
});
jMenu4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenu4ActionPerformed(evt);
}
});

jMenuItem21.setText("LowerCase");
jMenuItem21.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem21ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem21);

jMenuItem22.setText("UpperCase");
jMenuItem22.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem22ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem22);

jMenuItem13.setText("Wrap");
jMenuItem13.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jMenuItem13MouseClicked(evt);
}
});
jMenuItem13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem13ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem13);

jMenu3.setText("Selected Word Count");

jMenuItem14.setText("Exact Selected text");
jMenuItem14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem14ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem14);

jMenuItem15.setText("Ignore case of Selected text");
jMenuItem15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem15ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem15);

jMenu4.add(jMenu3);

jMenuItem23.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem23ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem23);

jMenuItem24.setText("Encrypt");
jMenuItem24.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem24ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem24);

jMenuItem28.setText("Decrypt");
jMenuItem28.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem28ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem28);

jMenuItem16.setText("Replace");
jMenuItem16.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem16ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem16);

jMenuItem19.setText("jMenuItem19");
jMenuItem19.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem19ActionPerformed(evt);
}
});
jMenu4.add(jMenuItem19);

jMenuBar1.add(jMenu4);

jMenu5.setText("Help");

jMenuItem17.setText("About Software");
jMenuItem17.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem17ActionPerformed(evt);
}
});
jMenu5.add(jMenuItem17);

jMenuBar1.add(jMenu5);

setJMenuBar(jMenuBar1);

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

pack();
}//

private void jList1MouseClicked(java.awt.event.MouseEvent evt) {
jTextArea1.append("\n__________________"+jList1.getSelectedValue().toString()+"___________________\n");
}
private void jList1ValueChanged(javax.swing.event.ListSelectionEvent evt) {

}
private void jComboBox2MouseClicked(java.awt.event.MouseEvent evt) {

}
private void jComboBox2MouseEntered(java.awt.event.MouseEvent evt) {
GraphicsEnvironment ge = GraphicsEnvironment.
getLocalGraphicsEnvironment();
try {

String[] fontNames = ge.getAvailableFontFamilyNames();
for(int i=0;fontNames[i]!=null;i++) {
jComboBox2.addItem(fontNames[i]);
}
}catch (Exception ae){}; // TODO add your handling code here:
}
private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {
int fontstyle = jTextArea1.getFont().getStyle();
f=new Font(jComboBox2.getSelectedItem().toString(), fontstyle,Integer.valueOf(jComboBox4.getSelectedItem().toString()));
jTextArea1.setFont(f);
}
private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {
if((jComboBox3.getSelectedItem().toString()).equals("Bold")) {
f=new Font(jComboBox2.getSelectedItem().toString(), Font.BOLD,Integer.valueOf(jComboBox4.getSelectedItem().toString()));
jTextArea1.setFont(f);
}
if((jComboBox2.getSelectedItem().toString().equalsIgnoreCase("Italic"))) {
f=new Font(jComboBox3.getSelectedItem().toString(), Font.ITALIC,Integer.valueOf(jComboBox3.getSelectedItem().toString()));
jTextArea1.setFont(f);
}
if((jComboBox2.getSelectedItem().toString().equalsIgnoreCase("Regular"))) {
f=new Font(jComboBox3.getSelectedItem().toString(), Font.PLAIN,Integer.valueOf(jComboBox3.getSelectedItem().toString()));
jTextArea1.setFont(f);
}
}
private void jComboBox4ActionPerformed(java.awt.event.ActionEvent evt) {
int fontstyle = jTextArea1.getFont().getStyle();
f=new Font(jComboBox3.getSelectedItem().toString(), fontstyle,Integer.valueOf(jComboBox4.getSelectedItem().toString()));
jTextArea1.setFont(f);
jSlider1.setValue((Integer.valueOf(jComboBox4.getSelectedItem().toString())));
}
private void jSlider1StateChanged(javax.swing.event.ChangeEvent evt) {
int fontstyle = jTextArea1.getFont().getStyle();
f=new Font(jComboBox2.getSelectedItem().toString(),fontstyle,jSlider1.getValue());
jTextArea1.setFont(f);
jComboBox4.setSelectedItem(jSlider1.getValue());
jLabel5.setText(jSlider1.getValue()+" %");
}
private void jTextArea1CaretUpdate(javax.swing.event.CaretEvent evt) {
jLabel1.setText("Characters: " + jTextArea1.getText().length());
jLabel3.setText("Lines:"+jTextArea1.getLineCount()); // TODO add your handling code here:
}
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
try {
openFile();
} catch (IOException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
}
}
private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {
saveFile();
}
private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.cut();
}
private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.copy();
}
private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.paste();
}
private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {
}
private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.selectAll();
}
private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.replaceSelection("");
}
private void jMenuItem21ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.replaceSelection(jTextArea1.getSelectedText().toLowerCase());
}
private void jMenuItem22ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.replaceSelection(jTextArea1.getSelectedText().toUpperCase());
}
private void jMenuItem13MouseClicked(java.awt.event.MouseEvent evt) {
}
private void jMenuItem13ActionPerformed(java.awt.event.ActionEvent evt) {
if (jTextArea1.getWrapStyleWord()==false) {
jTextArea1.setLineWrap(true);
jTextArea1.setWrapStyleWord(true); // TODO add your handling code here:
} else {
jTextArea1.setLineWrap(false);
jTextArea1.setWrapStyleWord(false);
}
}
private void jMenuItem14ActionPerformed(java.awt.event.ActionEvent evt) {
try {
countselectedwords();
jLabel11.setText("|| " + t +" ||" + " (Your Selected Text) "+" is " + foundwords + " times in this File!!");
} catch (Exception ae){}
}
private void jMenuItem15ActionPerformed(java.awt.event.ActionEvent evt) {
}
private void jMenuItem23ActionPerformed(java.awt.event.ActionEvent evt) {
c = JColorChooser.showDialog(((Component)evt.getSource()).getParent(),"X-Pad Color Table", Color.blue);
jTextArea1.setBackground(c);
}
private void jMenuItem24ActionPerformed(java.awt.event.ActionEvent evt) {
s=jTextArea1.getText();
t="";
char d;
for(i=0;i d = s.charAt(i);
t+=(char)((int)d + 38);
}
jTextArea1.setText(t);
}
private void jMenuItem28ActionPerformed(java.awt.event.ActionEvent evt) {
s=jTextArea1.getText();
t="";
char d;
for(i=0;i d = s.charAt(i);
t+=(char)((int)d - 38);
}
jTextArea1.setText(t);
}
private void jMenuItem16ActionPerformed(java.awt.event.ActionEvent evt) {
try {
replacewords();
jLabel11.setText("|| " + t +" ||" + " has been replaced " + foundwords + " times in this File!!");
} catch(Exception ex){}//JOptionPane.showMessageDialog(null, date, "Today's Date is", WIDTH); // TODO add your handling code here;
}
private void jMenu4MouseClicked(java.awt.event.MouseEvent evt) {
if(jTextArea1.getWrapStyleWord())
jMenuItem13.setText("UnWrap");
else jMenuItem13.setText("Wrap");
}
private void jTextArea1MouseDragged(java.awt.event.MouseEvent evt) {
try {
jLabel4.setVisible(true);
jLabel4.setText(String.valueOf("Selected Characters: "+jTextArea1.getSelectedText().length()));
}catch (Exception ae){} // TODO add your handling code here:
}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
jTextArea1.copy();
s=jTextArea1.getSelectedText();

}
private void jMenuItem17ActionPerformed(java.awt.event.ActionEvent evt) {
Help h = new Help();
h.setVisible(true);
}
private void jMenu4ActionPerformed(java.awt.event.ActionEvent evt) {
}
private void jMenuItem19ActionPerformed(java.awt.event.ActionEvent evt) {
sentence_Case();
}
private void jLabel9MouseEntered(java.awt.event.MouseEvent evt) {
count_word();
jLabel9.setToolTipText("Total Words in the TextBox are: "+foundwords); // TODO add your handling code here:
}
private void jRadioButton1StateChanged(javax.swing.event.ChangeEvent evt) {
}
private void jRadioButton1MouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton2.setSelected(false);
jRadioButton3.setSelected(false);// TODO add your handling code here:
}
private void jRadioButton2MouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton1.setSelected(false);
jRadioButton3.setSelected(false);
}
private void jRadioButton3MouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
t=jTextArea1.getText();
s=jComboBox1.getSelectedItem().toString() + "_"+ jList5.getSelectedValue().toString();
saveDiaryFile(t,s);
}
private void jList5MouseClicked(java.awt.event.MouseEvent evt) {
if(jRadioButton5.isSelected()==true)
jTextArea1.setText((openDiaryFile(jComboBox1.getSelectedItem().toString()+"_"+jList5.getSelectedValue().toString())));
}
private void jRadioButton4MouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton5.setSelected(false);
}
private void jRadioButton5MouseClicked(java.awt.event.MouseEvent evt) {
jRadioButton4.setSelected(false);
}
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JComboBox jComboBox1;
private javax.swing.JComboBox jComboBox2;
private javax.swing.JComboBox jComboBox3;
private javax.swing.JComboBox jComboBox4;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JList jList1;
private javax.swing.JList jList5;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenu jMenu2;
private javax.swing.JMenu jMenu3;
private javax.swing.JMenu jMenu4;
private javax.swing.JMenu jMenu5;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JMenuItem jMenuItem1;
private javax.swing.JMenuItem jMenuItem10;
private javax.swing.JMenuItem jMenuItem11;
private javax.swing.JMenuItem jMenuItem12;
private javax.swing.JMenuItem jMenuItem13;
private javax.swing.JMenuItem jMenuItem14;
private javax.swing.JMenuItem jMenuItem15;
private javax.swing.JMenuItem jMenuItem16;
private javax.swing.JMenuItem jMenuItem17;
private javax.swing.JMenuItem jMenuItem19;
private javax.swing.JMenuItem jMenuItem2;
private javax.swing.JMenuItem jMenuItem21;
private javax.swing.JMenuItem jMenuItem22;
private javax.swing.JMenuItem jMenuItem23;
private javax.swing.JMenuItem jMenuItem24;
private javax.swing.JMenuItem jMenuItem28;
private javax.swing.JMenuItem jMenuItem3;
private javax.swing.JMenuItem jMenuItem4;
private javax.swing.JMenuItem jMenuItem5;
private javax.swing.JMenuItem jMenuItem6;
private javax.swing.JMenuItem jMenuItem7;
private javax.swing.JMenuItem jMenuItem8;
private javax.swing.JMenuItem jMenuItem9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JRadioButton jRadioButton1;
private javax.swing.JRadioButton jRadioButton2;
private javax.swing.JRadioButton jRadioButton3;
private javax.swing.JRadioButton jRadioButton4;
private javax.swing.JRadioButton jRadioButton5;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane6;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSlider jSlider1;
private javax.swing.JTabbedPane jTabbedPane1;
private javax.swing.JTextArea jTextArea1;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
private javax.swing.JTextField jTextField3;
// End of variables declaration

}