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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!