Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
import java.awt.print.PrinterException
|
||||
import scala.swing.TextArea
|
||||
|
||||
object LinePrinter extends App {
|
||||
val (show, context) = (false, "Hello, World!")
|
||||
try // Default Helvetica, 12p
|
||||
new TextArea(context) {
|
||||
append(" in printing.")
|
||||
peer.print(null, null, show, null, null, show)
|
||||
}
|
||||
catch {
|
||||
case ex: PrinterException => ex.getMessage()
|
||||
}
|
||||
println("Document printed.")
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
object LinePrinter extends App {
|
||||
import java.io.{ FileWriter, IOException }
|
||||
{
|
||||
val lp0 = new FileWriter("/dev/lp0")
|
||||
lp0.write("Hello, world!")
|
||||
lp0.close()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue