Pls urgent reply will be appreciated

A form i enclosed in a jscrollpane doesnt print the full form.
It only prints the part visible on the screen.
I,ve done all the 2d tricks like clipping, setting my imageable area all as i can...
pls urgent reply to this will be appreciated;
i attach my effort below..
public int print(Graphics g, PageFormat pf, int pageIndex) {
Graphics2D g2 = (Graphics2D) g;
Dimension d = getSize(); //get size of document
double panelWidth = d.width; //width in pixels
double panelHeight = d.height; //height in pixels
double pageHeight = pf.getImageableHeight(); //height of printer page
double pageWidth = pf.getImageableWidth(); //width of printer page
double scale = pageWidth / panelWidth;
//double scale2 = pageHeight / panelHeight;
int totalNumPages = (int) Math.ceil(scale * panelHeight / pageHeight);
if ( pageIndex >= totalNumPages ) {
return NO_SUCH_PAGE;
} else {
g2.translate(pf.getImageableX(), pf.getImageableY());
// shift Graphic to line up with beginning of next page to print
g2.translate(0f, -pageIndex * pageHeight);
// scale the page so the width fits...
g2.scale(scale, scale);
/*Rectangle rect = new Rectangle();
rect.x = getX();
rect.y = getY();
rect.width = getWidth();
rect.height = getHeight();
g2.setClip(rect);*/
paint(g2); //repaint the page for printing
//this.paintComponents(g2);
return PAGE_EXISTS;
}

Oh, my, it was so urgent that you didn't have time to go through the tips on [_Getting started with Sun Forums _|http://wikis.sun.com/display/SunForums/Tips], which would have shown you how to use the forum's code tags.
db

Similar Messages

  • Getting option value in jsp: Urgent help will be appreciated

    Hello All,
    I am working on JSP. I will grade myself as beginner in JSP.
    I am trying to solve since last 2 days, I just want to display the value of option tag, and not able to get it.
    <table>
    <tr>
    <td>
    <html:select name="ActionForm" property="overage">
    <%
    int i;
    int[] arr1=new int[200];
    for (i=0;i<=100;i=i+10)
    arr1=i;
    %>
    <html:option value="/<%=i%>/"><%= arr1%></html:option>
    <%}%>
    </html:select>
    </td>
    </tr>
    </table>
    Please, ignore the syntactical error.
    Now in above code I want to know what is being put up as value of option tag. By value I mean , I want see <html:option ]value="/<%=i%>/> . (Data marked in bold)
    Your help will be appreciated. I tried couple of things such as getParameter(), get Attribute(), getOverage(). Some of it gave me value as "//", it skips the i variable.
    I want to see what is being put up in value for every iteration of loop

    Yeah I know. But thnx for the response.
    I also got that error solved. you know what it was because of those bckslashes. i wrote it,
    <html:option value="<%=i%>"><%=arr%> instead of
    <html:option value="/<%=i%>/"><%=arr[i]%>
    and that worked perfectly. I wish I could have known this before. It would have saved me lot of time.

  • Help me doing bapi related to catsdb only  pls urgent step by step

    Help me doing bapi related to catsdb only  pls urgent step by step
    thank you,
    points will be rewarded,
    Regards,
    Jagrut BharatKumar Shukla

    Help me doing bapi related to catsdb only  pls urgent step by step
    thank you,
    points will be rewarded,
    Regards,
    Jagrut BharatKumar Shukla

  • HT204266 My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

  • HT201272 All my books disappeared when I bought a new computer and the download previous purchases doesn't work. Any suggestions will be appreciated.

    This is a problem I'm sure many people have had.
    I purchased several books a few weeks prior to purchasing a new computer. When I set it up using the file I had been saving to for the last couple of year I see that several of the Audio Books I had bought some as late as a few days prior, were missing.
    They're on my purchase list on the apple site but it doesn't let me download them so im stuck. I'm sure apple would just love it if I gave it the old American't try and gave up and called a loss and purchased them all over again.
    I've been using iTunes to make these purchases since they started iTunes. Since this isn't the first time its happened maybe I should call it all a loss and go shopping for another medium.
    Anyones help will be appreciated.
    Thanks
    Appler5210

    You say "ipod nano" in the subject line, but this is the forum category for the iPod shuffle (and you later say "ipod shuffle" in the post).  Is your iPod a shuffle or a nano?
    Even if iTunes is not installed, an iPod should charge when connected to an active USB port that is supplying sufficient power.  What indicates to your that the iPod is not charging?

  • I have a 5s phone.  How do I download ALL of the photos from my phone?  When I downloaded all of them, just the photos on Camera Roll were downloaded.  The photos in the folders were still there. Any help will be appreciated. Rosemary

    I have a 5s phone.  How do I download ALL of the photos from my phone?  When I downloaded all of them, just the photos on Camera Roll were downloaded.  The photos in the folders were still there. Any help will be appreciated. Rosemary

    tonefox
    What about photos downloaded from emails?
    Rosemary

  • I have recently upgraded to iPhone 5 from 4, call line identity doesn't work when call other iPhones.  It works when calling any other brand of cell phone.  Network carrier assures me problem is not on there side.  Any assistance will be appreciated.

    I have recently upgraded to iPhone 5 from 4, call line identity doesn't work when call other iPhones.  It works when calling any other brand of cell phone.  Network carrier assures me problem is not on there side.  Any assistance will be appreciated.

    I have recently upgraded to iPhone 5 from 4, call line identity doesn't work when call other iPhones.  It works when calling any other brand of cell phone.  Network carrier assures me problem is not on there side.  Any assistance will be appreciated.

  • My BB9810 refuse to load OS7.1 software on my phone after the download has completed. My phone has freezed/stucked since morning. Pls urgent help/assistant needed as I can not access/use my phone for over 24hrs now.

    My BB9810 refuse to load OS7.1 software on my phone after the download has completed. My phone has freezed/stucked since morning. Pls  urgent help/assistant needed as I can not access/use my phone for over 24hrs now.

    Hi there,
    Use the method described in the link below to get back up and running:
    http://supportforums.blackberry.com/t5/Device-software-for-BlackBerry/How-To-Reload-Your-Operating-S...
    I hope this info helps!
    If you want to thank someone for their comment, do so by clicking the Thumbs Up icon.
    If your issue is resolved, don't forget to click the Solution button on the resolution!

  • HT3775 hello guys, i m just wondering that which software would be the best for my macbook pro. whenever i try to open those video, it says '(video name)avi' cant open. that will be appreciable if anyone can help me out. thanks.

    hello guys, i m just wondering that which software would be the best for my macbook pro. whenever i try to open those video, it says '(video name)avi' cant open. that will be appreciable if anyone can help me out. thanks.

    I think that VLC Media Player will play avi files.
    Regards,
    Clinton

  • I am unable to view flash videos from all websites except youtube after updating to Firefox 4. All help will be appreciated. Thanks in advance :)

    I am unable to view flash videos from all websites except youtube after updating to Firefox 4. All help will be appreciated. Thanks in advance :)

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)

  • I am using Mac, I have downloaded the Creative Cloud but when it comes to downloading an App, in the Apps tab a "Download Error" comes up, saying I should contact customer support. Any help will be appreciated.

    I am using Mac, I have downloaded the Creative Cloud but when it comes to downloading an App, in the Apps tab a "Download Error" comes up, saying I should contact customer support. Any help will be appreciated.

    sign out and then back in to your cc desktop app.
    if that fails to resolve the problem, Sign in, activation, or connection errors | CS5.5 and later

  • I am suspicious about  my billing. What am I going to do? Awaiting for your urgent reply.

    I am suspicious about my billing. What am I going to do? Awaiting for your urgent reply.

    These are user-to-user forums, you are not talking to Apple here.
    As you don't say what you are supicious about it's difficult to know what problem it is that you think that you have.
    You can check the purchase history on your account via the Store > View My Account (Store > View My Apple ID on iTunes 11) drop-down menu option on your computer's iTunes), though I'm not sure if that shows in-app purchases and/or auto-renewing subscriptions .  If you haven't purchased anything and you haven't added or changed your credit card details (when you do then a small temporary store holding charge may be applied to check that the details are correct and valid, which should disappear within a few days) then you can contact iTunes support via this page if you have charges that you don't think that you should have : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Using unicode in sms sending :)plz. urgent reply is needed.

    when i want to send a sms of string of unicode. is it necessary to encode it in UTF8 or UTF16 ???
    when i encode it then the length of the string comes larger.
    can i send sms as a string of unicode without changing its length????
    like this:
    String str="\u270F";
    // now str's length is 1
    str = new String(str.getBytes("UTF16"));
    //now str's length is 4!!!!!!!!
    plz. urgent reply is needed.
    best regards
    tanvir

    By default SMS has it's own text encoding and therefore you cannot use UTF8 nor UTF16. There is a special UCS2 encoding, alowing for 70 unicode characters to be send (per sms). See: http://www.dreamfabric.com/sms/

  • Requsting urgent Reply

    Hi,
    Can any body tell me the way how i need to upload storage bin data. which tool would be better whether LSMW or BDC
    and whether SCAT can be used?  
          say for example we have 50,000 bins.
    i am requsting an urgent reply. If u have any screen shots or process steps it would give me great confidence
    thanks&regards

    Hi
    better use BDC as number of input data is more.
    As per SAP CATT shoculd not be used for uploading data....
    Use LSMW , when table control is not required.

  • HT4064 I need help for a person with physical disabilities, a stylus type tool would help. Any ideas or product recommendation will be appreciated

    I am looking for a stylus type tool to help a disabled person who has difficulty with their hands and fingers . Any suggestions will be appreciated.

    http://www.techhive.com/article/1164440/macworld_buying_guide_ipad_styluses.html

Maybe you are looking for