Skip to content

Commit ac5824d

Browse files
authored
Merge pull request #50 from EliasAAradsson/docs-improvements
Docs improvements
2 parents f65e99e + 9a7d156 commit ac5824d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/scala/introprog/Dialog.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ object Dialog:
2323
/** Show a dialog with a `message` text. */
2424
def show(message: String): Unit = JOptionPane.showMessageDialog(null, message)
2525

26-
/** Show a `message` asking for input with `init` value. Return user input.
26+
/**
27+
* Show a `message` asking for input with `init` value. Return user input.
2728
*
28-
* Returns empty string on Cancel. */
29+
* @param message prompt text displayed for user
30+
* @param init intitial value displayed in input dialog
31+
* @return user input, or an empty string on Cancel
32+
*/
2933
def input(message: String, init: String = ""): String =
3034
Option(JOptionPane.showInputDialog(message, init)).getOrElse("")
3135

0 commit comments

Comments
 (0)