Question
Develop a simple tool for calculating some basic statistics about a segment of text. Your finished program should look as similar as possible (or better!)
Develop a simple tool for calculating some basic statistics about a segment of text. Your finished program should look as similar as possible (or better!) than the sample shown below. The application should have a single window with a scrolling textbox (see JTextArea) and a statistics box. The statistics box should be a panel with a titled border. This box should contain labeled fields that display the following statistics: The number of words in the textbox The average word length The number of vowels The statistics box should also contain a button. When the button is pressed, your application should re-compute the statistics for the current contents of the text field. Feel free to display extra statistics than the ones currently shown.
Tips: Remember you can nest panels. Use layout managers. You can wrap the text in a JTextArea using the method setLineWrap(true). To match on non-alphanumeric characters: \\W+ Do not place all of your code into the constructor and the event listener. Use good OO thinking to break your program into small pieces
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started