Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+20 votes
asked in CSC305 Fall 2023 by (1 point)
+2
  1. Confirm printer availability using Printer.getDefaultPrinter().
  2. Display a print dialog using showPrintDialog(null) for user settings.
  3. Pass the VBox with lesson plan cards to printPage for content printing.
  4. Organize code by creating a separate method like printContent.
  5. Include error handling to inform users if printing fails.

2 Answers

+5 votes

In our team project, after we created a PrinterJob class we generated a node representing printable content. Each card in the lesson plan is represented as a Node, and these nodes are arranged vertically in a VBox (printableContent).

answered by (1 point)
0

How did you implement it with the print button? When we tried to run it just showed a blank screen.

+2 votes

It can be tricky this time around because on the recent sprint we were told to find a way to print in a way where they only see the text. Perhaps you create a class that is used to filter the cards and the give a nice format given all the cards from the plan. Like if you have a plan class you have get all cards in that plan in the plan class and connecte it to the build print format class and print it?

answered by (1 point)
...