Professional Documents
Culture Documents
Institute
Seal
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
This is to certify that Mr./Ms. Shweta Bhargude Roll No: 56 of V Semester of
Diploma in Computer Engineering of Institute: MIT Polytechnic Pune
(Code:0148) has completed the Micro Project satisfactorily in Subject:
Advanced Java Programming (22517) for the academic year 2020-21 as prescribed
in the curriculum.
Institute
Seal
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION
The Word Counter is a dynamic online tool used for counting words,
characters, sentences, paragraphs and pages in real time, along with spelling
and grammar checking. Writers leverage it to improve word choice and
writing style as well as helping to detect grammar mistakes and plagiarism.
Additionally, to assist with public speaking, our tool will accurately
estimate speaking time to help with prep for class presentations, wedding
speeches, or anything of the sort.
The Word Counter by typing directly into the text area above or pasting in
your content. Word and character counts will display at the top.
WordCounter will help to make sure its word count reaches a specific requirement or
stays within a certain limit. In addition, WordCounter shows you the top 10 keywords
and keyword density of the article you're writing. This allows you to know which
keywords you use how often and at what percentages.
Execution
6. Report Generation
7. Final submission
Micro-Project Proposal-B
Word Counter Based On Swing
The Word Counter by typing directly into the text area above or pasting in your
content. Word and character counts will display at the top.
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class WordCounter extends JFrame implements ActionListener{
JLabel lb1,lb2;
JTextArea ta;
JButton b;
JButton pad,text;
WordCounter(){
super("Char Word Count Tool - JTP");
lb1=new JLabel("Characters: ");
lb1.setBounds(50,50,100,20);
lb2=new JLabel("Words: ");
lb2.setBounds(50,80,100,20);
ta=new JTextArea();
ta.setBounds(50,110,300,200);
b=new JButton("click");
b.setBounds(50,320, 80,30);//x,y,w,h
b.addActionListener(this);
setSize(400,400);
setLayout(null);//using no layout manager
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE); }
public void actionPerformed(ActionEvent e){
if(e.getSource()==b){
String text=ta.getText();
lb1.setText("Characters: "+text.length());
String words[]=text.split("\\s");
lb2.setText("Words: "+words.length);
}else if(e.getSource()==pad){
Color c=JColorChooser.showDialog(this,"Choose
Color",Color.BLACK);
ta.setBackground(c);
}else if(e.getSource()==text){
Color c=JColorChooser.showDialog(this,"Choose
Color",Color.BLACK);
ta.setForeground(c);
}
}
public static void main(String[] args) {
new WordCounter(); }
}
4.0 Actual Resources used:
Computer system – Any desktop or laptop computer.
Software used – Windows 10, Eclipse IDE