JTable printing and multiline footer

I am trying to switch to Java5 JTable printing. I had a 2 lines footer text on the printout before. With Java5 I tried it this way
                Printable printable = thistable.getPrintable
                    JTable.PrintMode.FIT_WIDTH,
                    new MessageFormat("title"),
                    new MessageFormat("line1" + "\n" + "line2")
                );  On the printout only one line appears, the \n is ignored. Is there a possibility to have multiline footers with Java5 table printing?

On the printout only one line appears, the \n is
ignored. Is there a possibility to have multiline
footers with Java5 table printing?From my experience no. You may have to roll out your own printing
code
Don't mind if i ask but why do you want a multiline footer?
Richard West

Similar Messages

  • Table.print(mode, header, footer) question

    hi...
    i want to print a table with title...
    filling header parameter in jtable.print(mode, header, footer) seems alright
    but it re-print the header on every page...
    what can i do to make the header printed only on the 1st page ?
    thank's

    Sorry, I cannot answer this question.
    I read your previous post about:
    "groupable + multiline table header paint problem"
    Did you solve this problem? I got the same issue ...
    Thanks,
    Tommy
    [email protected]

  • Report column footer print after report footer

    I have a report which has column footer and report footer.
    The column footer always print in the bottom of the page and it happens the report has half page then report footer print before column footer.
    I would like to know is it possible to have column footer just after last detail line print and report footer print after column footer which is more professinal report format,
    Your help and information is great appreciated,
    Regards,
    Iccsi

    iccsi wrote:
    I would like to know is it possible to have column footer just after last detail line print and report footer print after column footer
    It is not possible to change the order in which the footers print.
    To achieve what you want, do not use the "column footer" band. Create a dummy report group and use that group's footer, which will always print before the "report footer".

  • JTable Print to Adobe Acrobat Error

    I'm having trouble printing a jTable using Java 1.5.0_03 to Adobe Acrobat (6.0). Whenever I call print using (assuming proper try/catch statements) either
    jTable.print();or
    printJob.setPrintable(jTable.getPrintable(JTable.PrintMode.FIT_WIDTH, new MessageFormat("Header"), new MessageFormat("Footer")));
    if (printJob.printDialog())
    printJob.print();the printed jTable's column headers extend higher than they are supposed to like they were stretched (like when you drag the scroll bar down on your screen and the screen freezes), and effectively cover up parts of the header (the "Header" in this case).
    My jTable is setup as follows
    XYZ = new DefaultTableModel();
    XYZ.addColumn("A");
    XYZ.addColumn("B");
    jTable = new JTable();
    jTable.setModel(XYZ);I think this is an error with how the print function interacts with Adobe Acrobat as I don't have this problem printing to a normal printer. Is there any way to fix this?

    Are you saying there is no Adobe PDF printer, or it does not work? If it simply that it does not seem to work, then try to print to file with the printer. Then open the file in Distiller. If you get a resultant PDF, then the problem is most likely that you have somehow deactivated AcroTray.exe in the running applications. The program is in the Acrobat folder and needs to be started in that case. It should also be listed in your boot sequence for startup.

  • Again jtable printing

    how can i print a header for a jtable besides the column name. example i want a string of data before printing the table.thanks...

    On the printout only one line appears, the \n is
    ignored. Is there a possibility to have multiline
    footers with Java5 table printing?From my experience no. You may have to roll out your own printing
    code
    Don't mind if i ask but why do you want a multiline footer?
    Richard West

  • Report Builder - Last page issue and Report Footer issue

    I am using ColdFusion 9 Report Builder, am new to this product and encountering 2 issues.
    Issue 1 - I have a field that I would like to print on the last page of my report.  How can I determine the last page?  I initially tried using a calculated field set to the 'highest' calc.Page_Number.  Then I could compare the current page to the last page in the 'Print When' property.  But calc.Page_Number can not be used in a definition of a calculated field.
    Issue 2 - Depending on the amount of report detail, sometimes my report footer prints alone, without a page header and page footer.  The report includes this page in the total number of pages.  For example, if it is a 2 page report, the page header on page 1 will display Page 1 of 2.  Then the only data on Page 2 is the Report Footer.  No page header or page footer prints. 
    Any assistance on these issues would be most appreciated.  To date, using the Report Builder has not been easy.

    To issue 1: The report contains a report band called report footer. thsi is always at the last page. The report footer band initially is collapsed, so you have to expand it by dragging the last band divider.
    To issue 2: I guess this is a page break calculating error when detail data reaches really near the page footer area.
    Try some experiments with different setting of the following properties/issues:
    - in elements, e.g. calculating fields in the bands between report detail and page footer: In Properties / Print Control / Printing Options: Activate the option "Remove line when blank". This will remove the whole report band area if this field is blank. May save some empty space.
    - try to remove unused empty space between detail rows.
    - try to resize and reposition all detail fields so that they snap to the grid.
    Best regards

  • How do I print a interactive form out? It allows printing and filling.

    Hi, I'm trying to print out an interactive form that I filled out and then saved on my hard drive. The author allows printing and filling out of the PDF when it was created. I'm running Windows 7 64-bit and have Adobe Reader XI (11.0.06) installed along with the current drivers for my compatible printer. Within the same PDF the first sheet "instruction sheed" is an all text flat form, which prints just fine. The problem lies when I try to print other sections of the PDF, When I try to print it all I get is the header and a footer that the author created, but all the spaces where questions/ text and my fill in answers don't show up on the print preview image or when the printed sheet comes out of my printer.
         I have tried to print as an image without success. I don't think its an author issuse because it was released out of a California Department for several houndred/thousands of others. Please if you have any ideas or questions i look forward to any advice.

    Sorry I forgot to add that the PDF is devided by a "Chapter" style cover face that devided multiple sets of forms in to categories. At the bottome of these categories is a "Print whole document" which can only be clicked once the whole thing has been filled out. Do to some information over lap some dates don't follow the (time line order) it requirest to fill in the data so two of the categories show up as incomplete. Take a look at the document yourself, maybe I NEED to rewrite the information and see if that works.
    *Edit* Looks like I CAN print a blank form at the begining when it asked me if i want a blank form, will try to rearange dates so it will show as all COMPLET.
    PDF file can be found at the California government website:
    http://www.chp.ca.gov/recruiting/pdf/Chp446.pdf
    http://www.chp.ca.gov/recruiting/pdf/Chp446.pdf

  • How to write code to print and save the output in my GUI?

    I had been searching on code to program print and save commands to print and save the output from the GUI but to no avail. Can someone help me?

    The output will be link from the previous GUI page. Hence the output is a page with Jtable and a button for print to print the information in the JTable.

  • Jtable.print()

    hey all,
    ok... i have a little problem trying to print a jtable. the printing itself is no big deal and it works fine. however the column headers are printed blurry and pixelated. i know that this has to do something with the look and feel because when i use the java laf then the column names are printed perfectly fine. so as soon as i use another laf the headers are blurry. the laf im using is:
    de.javasoft.plaf.synthetica.SyntheticaBlackStarLookAndFeelim using java 5 and i did a little research and i found out that this is probably a bug, does anyone know a workaround? i already tried to use a printerjob but didn't make a difference. so im kinda stuck :(

    Are you using your own implementation of Printable? If you have jdk 1.5, you can simply call myTable.print () and swing does the rest

  • HP 3515 not printing the bottom footer

    Hello,  I have trouble printing the footer part of any document format/ that of letter head in my HP Deskjet 3515. In the print preview section it shows the footer part, but when it prints only the straight line of the footer gets printed. and not the information below the line. in my other printer, it gets printed. The header part gets easily printed but not the footer. Please help! Thanks! 

    Hello Officealpine,  Welcome to the HP Forums.  I see that you are having an issue with the bottom portion of your document not being printed. I do have a few suggestions that we can try that may resolve the issue for us. First off, please make sure that you have the printer power cable connected directly to a wall outlet and not a power bar/strip. Here is a document that uses a LaserJet printer as an example but it is meant for HP products in general. Please click on the following link that explains the Issues when Connected to an Uninterruptible Power Supply/Power Strip/Surge Protector. Once you have the printer power cable connected to a wall outlet, please use the ON/OFF button to do a proper power cycle.  This will perform a Semi Power Reset on the printer. Try the print job again and if you are still having issues, this could be a possible software issue.  Run the HP Print and Scan Doctor.  If you happen to see any error codes or messages, please write me back in full detail.  Thanks for your time.   Cheers,  

  • I am having trouble printing to an Epson XP600.  It is a new printer and it has been replaced because we thought it was the printer.  Basically, when I print from Excel, only color will print.

    I am having trouble printing to an Epson XP600.  We have replaced the printer and we are still having the same problem.  When I try to print from Excel, only the color prints.  Any suggestions?

    Has anyone else had issues not being able to print black (such as a document)?  My photos print great, but when I try to print a simple black-ink document, it won't work. Any suggestions?

  • I have an wireless printer and a new wifi router. I have set the printer and iPhone / iPad correctly to the new router but when i try to print it won't recognise the air printer. Help. All was working fine on my old router

    I Have a new wifi router and have set up my iPad / iPhone and wireless printer correctly  to the new router but I can't print from the iPad and iPhone. It keeps saying ' no AirPrint printer found'. Help please!

    Start with the most basic thing that you can try. Unplug the router from power for about 30 seconds, and restart the printer and the iPad and plug the router back into power.

  • We just added a new printer and bluetooth connection to our iMac.  Now iTunes does not recognize our iPads as devices.  Have already tried restarting everything.  Any other suggestions?

    We just added a new printer and bluetooth connection to our iMac.  Now iTunes does not recognize our iPads as devices.  Have already tried restarting everything.  Any other suggestions?

    You can try the steps recommended here: http://www.apple.com/support/ipad/assistant/itunes/

  • Just bought a new printer and download the software

    Hi,
    I just bought a new printer and I need to be able to print all of my homework assignments off but i tried to come to the website on several occassions, the site is always down. So what do I need to do next? Do I call someone about the problem or do I just take the printer back and buy another one from another company. And I do not have a CD drive for my small laptop.

    Hi,
    What is your printer and the Operating system of your small laptop ?
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • I installed a new printer and now Photoshop Elements tells me I can't print.  The error message is "The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available.  You will need to che

    I installed a new printer and now Photoshop Elements tells me I can't print.  The error message is "The saved printer information is not compatible with this version of Photoshop Elements, or the saved printer is no longer available.  You will need to check your printer settings before printing."  I have uninstalled and re-installed Photoshop Elements, checked my printer settings and still I can't print a photo.

    Hi ,
    Please update to PSE 13.1
    13.1 has solved this problem.
    Refer to this link.
    Photoshop Elements Help | Printer errors with Photoshop Elements 13

Maybe you are looking for