java does not seem to like that barcode font i want to use (nor does C#)
807605Sep 22 2007 — edited Sep 23 2007Hi,
My situation is as follows:
My dad runs his own business. He barcodes a lot of the products, but every now and then something happens where the barcodes are not correctly aligned when they print. He has hundreds of barcode files, all of which you have to open and change the setup individually. This takes an awful lot of time. Rather than spending a fortune on another barcoding machine or another program and risking the same thing happening again, I am making a barcode program for him. This program currently has general settings (the width / height etc will be the same for all barcodes, not individual). I have the program set up so you can open a file dialog (which I have programmed myself, not using one of the built in file dialog things), then you can select a file and open it. It currently displays the details (product code, design name and barcode number) in JLabels, which are on a JPanel in a JFrame.
I have recently downloaded an EAN-13 font. I can get this font to work properly in Word, but when I try to put it to a JLabel, the label goes blank but the program shows fine. When I try to put the font to a JTextField or JTextArea, the program does not display properly and does not even show the textfield or textbox. Word says the font is a .TTF file (True Type). C# says it is not, but java doesnt tell me whether it is true type or not. Am I just using the wrong components for displaying barcode or is there something else I am not doing or what? Is it something to do with using graphics.paint() or something like that?
Thanks in advance for any help.
RC