How to print table in java

we have to take a print out of a JTable.
but we have some other components on the GUI along with the
JTable.
Our query is that ,how can we just take the print out of the JTable?
we r using the jdk1.4.2 version,in which we don't have any direct method
in JTable for taking its print.
any valuable suggestion will be appreciated.

Allow me to introduce you to my leetle friend, Mr. API:
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JTable.html#print()

Similar Messages

  • How to print "Text" in JAVA(TM)....

    Does anyone know how to print "text" using Java?
    - Here's an example output...
    NOTE: # == 'empty spaces'
    --------------------------- <- Paper
    |###################|
    |####Welcome#########|
    |###################|
    |########to##########|
    |###########JAVA(TM)##|
    |###################|
    |#######Programming####|
    |###################|
    Please post a complete << SAMPLE CODE >> for printing the "text" (Welcome to JAVA(TM) Programming. Including the indentions. So it will not be like this...
    -------------------- <- Paper
    |Welcome |
    |to |
    |JAVA(TM) |
    |Programming |
    | |
    | |
    | |
    | |
    Thanks.

    Please read How To Ask Questions The Smart Way

  • How to print table items in column in smartform in 4.6c version.

    Hi Experts,
    I want to print the items i have in columns (like name invoice number) in smartforms but when i create table in main window there no options for header footer and main area, i have created the template for header and footer but how i print the items in columns. Pls reply ASAP.
    Thanks in advance,
    Abhishek Pandey.

    Hi
    create a table under main window
    Under the Header create a Row or Line
    Under the Row create a Cell and Under that Cell create a text field
    In that text you can write what ever field name u want to write
    Reward if it is helpful to you
    Thanks
    Krushna

  • How to View Tables from java side from NWDS/NWDI?

    HI All,
    I want to view the following tables from java side
    CRM_ISA_ADDRESS
    CRM_ISA_BASKETS
    CRM_ISA_BUSPARTNER
    CRM_ISA_EXTCONFIG
    CRM_ISA_EXTDATHEAD
    CRM_ISA_EXTDATITEM
    CRM_ISA_ITEMS
    CRM_ISA_OBJECTID
    CRM_ISA_SHIPTOS
    CRM_ISA_TEXTS
    How can I view them using NWDS/NWDI?
    Which DC has this tables?
    Could you please help me with the procedure to view them?
    Thanks and Regards,
    Gauri

    Hi All,
    crm/isa/isacoreddic and crm/isa/shopddic in SAP-CRMDIC are having these tables.
    Thanks and Regards,
    Gauri

  • Funtion is returning jstring, how to print it in java code

    Plz let me know how to print a jstirng which is returning by a native function in java.
    When i use System.out.print(view());
    it gives me error.
    what i shoulr do with jsting so that i can use/print it in java.

    dscdscWhat do you mean by that?

  • Smartforms  how to print Table rows on to the next page automatically

    if this question is answered pls point to the the link
    SMART forms:
    layout :  Half of my A4 page is filled with templates, a small portion is footer, the middle portion is Table.
    Note: i have set the condition for the footer as (tick the check box) "only after end of main window"
    Output:
                       the template is displayed the table is populated on the first page, no footer on 1st page,
                    on page 2 the table rows are printed (table rows were a lot) and finally footer got printed every thing as per normal
    what i want is:
                     instead of the table lines printed in the middle of page 2 (bcz my main window table is in the middle, top is templates)
                     i want the table lines (after filling the main window table lines in the 1st page) to continue to print from the
                     top of the page on page 2 and immediately after the table rows finish. footer must be printed....
    what should i be doing to get this output

    dear bob,
    yes i have done that already as u said, when i do it......
    i created a new page (next page) directed first page to next page
    on the next page my layout is like below
    removed all the templates dragged the main window to the top of the page...... 
    when i check the result, there is an empty line as the first line in the table (2nd page)
    and also the footer (again a template) on the first page, which is ticked as ( print after end of main window) is NOT displaying.

  • How to create table in java

    i need help on this topic
    how to create table in java

    lucky786 wrote:
    help urgentlyI am too late?

  • How to: Print table on first page, use second page (back) for text only

    Hi, I am looking for a clear document on how to use pagination and the Odd and Even pages.
    We need to print a table over several pages, but only on Odd pages.
    On the back of each page we need to print "Terms and Conditions". Is that possible? Can it be done without scripting
    We are on ADOBE version 8.1
    In the file properties, double sided is switched on, and version set to 8.1 and higher.
    I created two Master pages, a FrontPage with ContentArea1and a BackPage with ContentArea2.
    FrontPage is used for uneven pages, BackPage is used for the even pages. The masterpages are printed correctly (alternating properly).
    Two pages were created for the content area's:
    ITEMS: contains item data (table with header and footer). Place is "On Odd Page". After "Goto page BackPage". And if the table needs to be paginated it goes to BackPage with overflow leader "Conditions".
    CONDITIONS: contains a textfield (Terms and Conditions). Place is "On Even Page". After "Goto page FrontPage". No overflow.
    What should happen is that on the front pages the item table is printed. If there are too many lines it should overflow to page number 3 then 5 etc. All the even pages should display the text.
    What actually happens is that the item table also gets printed in the content area for the Condition text...
    Also the "Conditions" are not printed on the last back page. But only once before it...
    Cheers,
    Edwin.

    Fixed it... After a lot of creating, deleting, playing around with pagination and the inevitable cursing...
    I have created 5 pages:
    1. FirstPage
         - Odd/Even: Odd (Front) Pages
         - Placement: First page (In page set)
    2. FrontPage (For Odd pages)
         - Odd/Even: Odd/Front Pages
         - Placement: Rest of Pages
    3. BackPage (For Even pages)
         - Odd/Even: Even (Back) Pages
         - Placement: Rest of Pages
    4. LastPage
         - Odd/Even: No Odd/Even Restrictions
         - Placement: Last page (In page set)
    5. DummyPage
         - Odd/Even: Blank pages
    The 'Terms and conditions' are located on the BackPage and LastPage (as a text).
    The table that is printed is (of course) located on a normal page (flowed subform).
    Pagination tab: Placement = Following previous, and After = "Continue filling parent". No overflow... Basically, it's all default.
    The table lines will now start on the first page and if there are more lines than can be printed on this page, it will continue in the next content area. That will be on the FrontPage.
    The trick is that each master page must have a content area (mandatory). Except for Blank pages, but these cannot be used... Blank pages would only be used once, after the first page.
    What I discovered is that you can drag a content area away from the Master page and attach it to a different master page.
    Logically, if there is no content area on a page, then data cannot be printed there. So, I created a Dummypage. On this page I dumped the content areas from the LastPage and the BackPage. As a result, content cannot be printed anymore on the back of pages. Only the standard text (a text field) is printed there. When the data from the table is overflowing, it will automatically overflow from the FirstPage to the next content area. Which is located on the FrontPages only.
    The DummyPage is NOT used anywhere.
    The result is that the records can only be printed on the content areas that exist on the First and Front pages. The back pages are now skipped.
    Duplex printing is now working correctly, and the text is printed on the back of all the pages.
    Cheers,
    Edwin.

  • How to print table contents?

    hi @,
    I am having a view which is dsiplaying data fetched from the R/3 through Adaptive RFC in a table. This table need to have a print functionality to print on the client.
    How to do this I am not having any function / UI to do this.
    Any help.
    Regards

    Hi,
    Try This:
    When the user click on Print button, launch a new window as below:
    public void onActionPrint(com.sap.xyz.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionPrint(ServerEvent)
              StringBuffer strB = new StringBuffer("/webdynpro/dispatcher/xyz.com/(component name space) ab~xyz~testprint/(application name)PrintTestApp");
              IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(strB.toString(), "Print");
              window.show();
        //@@end
    The above code helps to launch a new window with your Web Dynpro application. The application is sepecific to print functionality.
    ThePrintTest App should have the content with format what exactly you would like to print. (Users use the browser standard print functionality to print the table content).
    This is a kind of work around and as of NW 7.0 there is no standard print functionality available in Web Dynpro.
    Thanks
    Krishna

  • How to Print reports with Java Application

    I'm developing a database application in java using rmi and swings. Now I want to take some printout of reports from that application. Is any report designer available for java applications. How can i solve this problem. Please help me.

    Hi
    I don't know i f exist a tool like you want, but, in Java
    the print job is implemented by a class implementing the Printable interface.
    A class "Printable" must implement the print method like is defined at scpec. This method, via the params, can do print by "drawing" the page and, finally, return an integer
    indicate if the print loop must continue or not.
    The drawing op over the printer Graphics context is realized by methos of Graphics object (if you want "print"
    some text you can do g.drawString("some text",x,y) and so on).
    See the tutorials for more info
    Hope this help

  • JDeveloper Team - How to print Barcodes from java application

    We are developing an Inventory based application in JDeveloper 3.2.2/Oracle 8i/Netscape Enterprice web server on Windows NT platform. The application is developed in swing technology.
    We have to print Barcodes on Intermec 3400/4100 or Zeebra Z4000 (connected to COM1/COM2) from our java application from one of our screens.
    Can you please point me to right place or get me sample source how to achieve this. We are working on a timebound deadline and we are really counting on your sincere response ASAP. Thanks in advance.
    VR
    null

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

  • How to print PDF under Java control

    Hi, all - thank you for reading this message.
    I'm working with Java 1.4.2_12 and Tomcat but planning to migrate upward Real Soon Now. We are running on Windows Server 2003 (customer's choice).
    My application, using iText, creates a PDF, which comprises a new coversheet plus some existing PDFs appended. The new PDF is needed for archival. This part works OK.
    Now, still in my Java app, I would like to print the new PDF, to a printer chosen in my code. At present I have only PCL and basic PS (2?) capable laser printers, mostly HPs, available and these are all networked - not local - printers.
    I have tried some things using PrintService and this cannot find any PDF printers from the server, though for comparison it did correctly find some PostScript capable devices. Attempts to actually print have resulted in garbage, with the printer obviously mangling the PDF over several trees-worth of paper, if not stopped.
    Has anyone else managed to 'filter' a PDF (under program control) and send it to a regular, networked printer, such as I have described?
    Can anyone confirm that a PS 3 capable printer would handle a PDF direct and if so what DocFlavor would be appropriate?
    Sorry if this is a trivial issue but I have spent quite some time on it and would appreciate any input.
    Thanks - Edwin
    Message was edited by:
    EdwinBolton

    jPDFPrint by Qoppa Software. It's a 100% java library to print PDF documents.

  • How to make table in java application?

    I am using visual cafe tool for creating the GUI interface, but i don't konw how to construct a table for my game.
    thank u

    in visual cafe there is a table icon on the swing tab. you should be able to just drag and drop it on your interface that you are creating. once on the gui you can set the properties for the table by right clicking with the mouse and choosing 'properties'. hope this helps.

  • How to print table twice (and more)

    Hi,
    I have a problem with interactive form placed into WD4A. I have a table in it and I want to print this table on all my 4 pages. But table is printed only on first one, others are emty. What should I set to print the same table on all pages of my form?
    Many thanks for answer!

    Hi,
    your suggestion is solution, but only workaround (many thanks for it!).
    If I have binded only field (no table) for textfield on more pages, content of this field is printed on all pages, I think behaviour for tables should be the same, because sending same data 4times is nonsense. Isn't there any javascript to "reset" table after print?
    Many thanks for any answer!

  • How to print Table with fixed height?

    Hi,
    I am developing an invoice. I am printing the invoice lines in a table and the number of lines may vary.
    I am using the table to print the lines in word rtf template. The table cells don't have the border.
    I am facing the following problems:
    1. The table height varies based on the number of invoice lines. I don't want that. I want to fix the table height. I can draw the line and create the table, that may solve this problem for 1 page invoice, but that doesn't solve next issue i.e. issue #2.
    2. If the invoice goes beyond 1 page, then the table continues and on the 1st page the table is open from the bottom, as I have table without the internal cell border. I want close the table on the 1st page and rewrite the table in the 2nd page.
    Please let me know, if you have any solution for these issues.
    Thanks!!
    Edited by: Sanket_Bhabad on May 17, 2013 8:01 AM

    Take a look at this blog post: https://blogs.oracle.com/xmlpublisher/entry/anatomy_of_a_template_i_fixed
    Thanks,
    Bipuser

Maybe you are looking for

  • Filter for BAdi CRM_ORDER_STATUS does not work in WebUI

    Hello, we have made an implementation for BAdi CRM_ORDER_STATUS for our sales cycle. In detail: The BAdi implementation shall be triggered if the user sets a special user status within an opportunity. Therefor we have used the standard filter functio

  • Calling c functions in java

    How do I call c functions from java?

  • Purchasing new iMac, upgrade to Lion

    Seems there are no iMacs currently available with Lion installed. I can't seem to get the Apple support people to accurately address this question:  If I were to purchase one that has Snow Leopard, how much initial set up is involved before I can dow

  • [KDE] Window changes size after single click on title bar

    I have a problem with some behavior of window for latest versions of KDE. When window is maximized and I click on the title bar window returns to the size which was before maximization. I want that the click will be only recall the window with any ef

  • TS1424 How do i get credit for an iPhone app?

    How do i get credit for an iPhone app that was billed to me?  The description even said that the app was free that day.  I downloaded it once and it showed TWO downloads, with the first one FREE and the second one I got billed for.  It was only $0.99