Question

I have made a Billing software in Java ( Using Netbeans ) , All the components are working perfectly now , except the Printing section ...

I want to Draw a bill ( With the Store Name , Address , etc ... ) , Add the values of the jTable ( Containing sales details ) , and also a Footer ( containing Date , Time , etc ) ...

Can anyone please guide me ...

Was it helpful?

Solution

Use a dedicated library like Jasper Reports. It will get much easier after and their guide is pretty comprehensive.

OTHER TIPS

Try using nested panels. Use JPanel class. Strategy can be to use 1 Main Panel for whole of the bill. Add 3 different panels to this main panel. Add Header ( Draw a bill ( With the Store Name , Address , etc ... )) to first panel. Sales info inside a JTable. Add this table to seconed panel. Similarly add Footer to the last panel. Refer this link for JPanel.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top