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 ...

有帮助吗?

解决方案

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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top