Skip to content

Commit

Permalink
Fix grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
lulunac27a committed Mar 17, 2024
1 parent 2fabcb4 commit 59f56f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class fileTextCounterGroovy {
selectFile.addActionListener(new ActionListener() {

@Override
void actionPerformed(ActionEvent e) { // when button is clicked
void actionPerformed(ActionEvent e) { // when the button is clicked
JFileChooser fileChooser = new JFileChooser()// create a new file chooser
fileChooser.fileFilter = new FileNameExtensionFilter('Text files', 'txt')
int fileResult = fileChooser.showOpenDialog(textCount)// show file dialog
Expand Down
2 changes: 1 addition & 1 deletion java/javaswing-textcounter/src/fileTextCounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public fileTextCounter() {
textCount.setVisible(true);// make the frame visible
selectFile.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {// when button is clicked
public void actionPerformed(ActionEvent e) {// when the button is clicked
JFileChooser fileChooser = new JFileChooser();// create a new file chooser
fileChooser.setFileFilter(new FileNameExtensionFilter("Text files", "txt"));
int fileResult = fileChooser.showOpenDialog(textCount);// show file dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class fileTextCounterKotlin {
textCount.isVisible = true // make the frame visible
selectFile.addActionListener(
object : ActionListener {
override fun actionPerformed(e: ActionEvent) { // when button is clicked
override fun actionPerformed(e: ActionEvent) { // when the button is clicked
val fileChooser = JFileChooser() // create a new file chooser
fileChooser.fileFilter = FileNameExtensionFilter("Text files", "txt")
val fileResult = fileChooser.showOpenDialog(textCount) // show file dialog
Expand Down Expand Up @@ -53,8 +53,7 @@ class fileTextCounterKotlin {
Characters: ${String.format("%,d", chars)}
Words: ${String.format("%,d", words)}
Lines: ${String.format("%,d", lines)}
"""
.trimIndent() // update text counter output
""".trimIndent() // update text counter output
}

@Throws(IOException::class)
Expand All @@ -71,7 +70,8 @@ class fileTextCounterKotlin {
}
return textContent
}
})
}
)
}

companion object {
Expand Down

0 comments on commit 59f56f3

Please sign in to comment.