Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file chooser to GUI #18

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

yashugrankar
Copy link

Issue #17 : A button has been added to the GUI, which when clicked creates a JFileChooser object that allows the user to select a text file from which text is fetched. This fetched text is then used to replace the contents of the input text area.

Issue JingMa87#13: Defining a new variable in each derived class to store the same default test case seems redundant. Therefore, I have shifted this test case into a static final variable in the base class.
Issue JingMa87#15: I have added a JComboBox to select the type of generator which should process the input text, along with a separate text area to display the result. I have also added an event listener to the 'Generate Text' button. When the button is clicked, the application will create an object of the selected generator type with the text in the input area as a parameter to its constructor, and call the generateText() method. I have selected a word limit of 200 here, but I suppose a text field to enter the word limit could be added to the GUI at a later stage. Finally, I have added a JLabel at the bottom to display the time taken for execution (in milliseconds). The label contents are updated each time the 'Generate Text' button is clicked.
Issue JingMa87#17: A button has been added to the GUI, which when clicked creates a JFileChooser object that allows the user to select a text file from which text is fetched. This fetched text is then used to replace the contents of the input text area.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant