Get screenshot of jswing component such as JFrame
Returns screen dimensions in pixels width x height
Get the name of current scala script being run as $ scala /path/script.scala.
Get the name of current scala script being run as $ scala /path/script.scala. It will return /path/script.scala
Open file with default desktop application.
Open file with default desktop application.
Example: It will open this PDF file with default system application.
scala> jswing.JUtils.openFile("/home/archbox/Desktop/functional-gui.pdf")
Open URL with default browser.
Open URL with default browser.
Example:
scala> jswing.JUtils.openUrl("http://www.yandex.com")
Read resource file
Run an action a single-time after a milliseconds delay with java swing Timer.
Run an action a single-time after a milliseconds delay with java swing Timer.
- Period in milliseconds (seconds x 1000)
- Code block that will be run after a delay.
- Function that when executed stops the timer.
Run an action every a milliseconds period with java swing Timer.
Run an action every a milliseconds period with java swing Timer.
- Period in milliseconds (seconds x 1000)
- Code block that will be run periodically.
- Function that when executed stops the timer.
Save a screenshot of jswing component such as JFrame to a PNG file.
General utilities for Java Swing. It provide functions to pick color, run actions on java swing thread, run actions periodically or with delay and etc.