URGENT ! Help to printing contents of a panel (Plz Help me)
hi guys,
i developed a application which consists of lot of information on a panel, i am using print utilities and printing the panel but its printing only the visible part of the panel and its printing a single page. is there any way i can print the whole contents of the panel
i really appreciate if anyone can help me out.
import java.awt.*;
import javax.swing.*;
import java.awt.print.*;
public class PrintUtilities implements Printable
private Component componentToBePrinted;
public static void printComponent(Component c)
new PrintUtilities(c).print();
public PrintUtilities(Component componentToBePrinted)
this.componentToBePrinted = componentToBePrinted;
public void print() {
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setPrintable(this);
if (printJob.printDialog())
try
printJob.print();
} catch(PrinterException pe) {
System.out.println("Error printing: " + pe);
public int print(Graphics g, PageFormat pageFormat, int pageIndex)
if (pageIndex > 0)
return(NO_SUCH_PAGE);
else
Graphics2D g2d = (Graphics2D)g;
g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
disableDoubleBuffering(componentToBePrinted);
componentToBePrinted.paint(g2d);
enableDoubleBuffering(componentToBePrinted);
return(PAGE_EXISTS);
/** The speed and quality of printing suffers dramatically if
* any of the containers have double buffering turned on.
* So this turns if off globally.
* @see enableDoubleBuffering
public static void disableDoubleBuffering(Component c) {
RepaintManager currentManager = RepaintManager.currentManager(c);
currentManager.setDoubleBufferingEnabled(false);
/** Re-enables double buffering globally. */
public static void enableDoubleBuffering(Component c) {
RepaintManager currentManager = RepaintManager.currentManager(c);
currentManager.setDoubleBufferingEnabled(true);
not exactly so...
implementing Pageable means imlpementing methods that return the number of pages, PageFormat object, and Printable object for each page... look in the API for this interface. It's actually quite a lot of work to do, as you have to divide your panel programmatically on "good" - suitable for your purposes rectangles of the page size, then cretae printale object for each ... but that can be done.
I'm not that familiar with java printing, perhaps there is a much easier way to do it. Anyway, when I had to print one component on several pages, that's what I did - so it works.
Similar Messages
-
hi. i am trying to transfer my old pictures and music files from my external drive into my new laptop.and first of all only a coupleof my foldersare coming up.and even those few files/folders wont play ....i am new to mac.i REALLY need help. my old pictures and music are real important to me.plz help me.
IS the external HD from another Mac or a PC?
-
Not all the time but sometimes when I charge my iPod nano mu iTunees will say iPod updated but when I unplug my ipod nano all the songs will erased of all iPod but there still on my iTunes. This has happened more then once. PLz HELP!!!!
Are you making sure to eject your iPod before disconnecting it?
While you are charging your Nano, you may want to click on the iPod icon under your playlists in iTunes, and see if any songs are on it. If not, your iPod may be set to manually update, which means you'd have to drag the songs you want to your iPod, as opposed to iTunes doing it automatically. -
Urgent:Error while importing project in ODI..plz help
Hi All,
We are getting below errors after importing the project folder.
In interfaces having file as source datastores, we are getting below errors
1) On source datastore,its giving error that "could not build the property panel for an object".
2) On requesting for data of source datastore it is showing:cannot display data: datastores are not on the same data server
3) On executing the interface its giving below error:
--the object no longer exists
Also, we are not able to see any field of source datastore(technology-File) in Source panel in the interaface after we imported project.
Message was edited by:
user625028Make sure that, you might have selected Duplicate mode while importing
and data stores id may be different . -
my question is how do my kodak 5250 printer work with my imac 21.5 os lion
What steps have you take to install the printer and how are you connecting it? Please answer both questions!
-
Need Some help in Developing an ALV report ..Plz help me
Hi Experts I am basic learner to ABAP Here I need some help in developing a Delivery *** Invoice Report....Please help me by spending a little time..
Tables are VBAK VBAP LIPS LIKP and Document floe table is VBFA
SELECT VBELN VKORG VTWEG SPART
FROM VBAK
INTO TABLE I_VBAK
WHERE VBELN IN S_VBELN.
IF I_VBAK IS NOT INITIAL .
SELECT VBELN POSNR MATKL POSAR WERKS
FROM VBAP
INTO TABLE I_VBAP
FOR ALL ENTRIES IN I_VBAK
WHERE VBELN = I_VBAK-VBELN.
ENDIF.
IF I_VBAP IS NOT INITIAL.
SELECT * FROM LIPS
INTO CORRESPONDING FIELDS OF TABLE I_LIPS
WHERE VGBEL = VBAP-VBELN
AND VGPOS = VBAP-POSNR.
ENDIF.
IF I_LIPS IS NOT INITIAL.
SELECT VBELN VSTEL VKORG KUNNR
FROM LIKP
INTO TABLE I_LIKP.
ENDIF.
Moderator message : Outsourcing is not allowed, don't expect others to correct your source code. Thread locked.
Edited by: Vinod Kumar on Aug 1, 2011 5:43 PMhi ,
Look in this link
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/content.htm</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/80/1a62bfe07211d2acb80000e829fbfe/content.htm</a>
Regards
Renjith Kumar -
Need help with ending of payment enrollment. Plz help as soon, as you can.
Hello, I bought a subscription for the iOS Developer, 11.03.13 deducted from my credit card $ 99. But the subscription has not joined. I received several letters, one of them written order number, but I can not see this number in your account - says error. Order No. 2442140328. Please help urgently to complete the process of registration and let me start downloading my app.
P.S.Adj text messages. Do not rule out the possibility that the activation email just did not happen.
Thank you for your order.
We’ll let you know when your items are on their way.
Items to be Shipped
Shipment 1 Available to ship within 24 hours via email
by Standard Shipping
IOS DEVELOPER PROGRAM $99,00
Shipping Address Yaroslav Tretyakov/Andrey Tretyakov
52 Udaltsova str., app. 6
Moscow 77 119607
Russian Fed.
Payment
Billing Contact Yaroslav Tretyakov/Andrey Tretyakov
[email protected]
Billing Address 52 Udaltsova str., app. 6
Moscow 77 119607
Russian Fed.
Subtotal $99,00
Free Shipping $0.00
Estimated Tax $0,00
Order Total $99,00
INVOICE RECEIPT
Dear Apple Customer,
Thank you for shopping at the Apple Store!
If you have already paid for your purchase, please retain this invoice receipt
for your records.
If you need to send payment to Apple, please reference Apple's Invoice Number on
your remittance. After remitting payment, please retain this invoice receipt for
your records.
Invoice Number: 4236349073
Invoice Date: 04/11/13
Reference Date: 04/11/13
Amount Due: .00
Customer P.O. Number: 79859994401
Sales Order Number: 2442140328
Customer Number: 900001
Terms: Credit Card
Sold To: Ship To:
Yaroslav Tretyakov/Andrey Yaroslav Tretyakov/Andrey
Tretyakov Tretyakov
52 Udaltsova str., app. 6 52 Udaltsova str., app. 6
119607 MOSCOW 119607 MOSCOW
RUSSIAN FED. RUSSIAN FED.
Item Product Product Description Total Total Unit Extended
Number Ordered Shipped Price Price
001 D4521G/A IOS DEVELOPER PROGRAM 1 1 99.00 99.00
Subtotal 99.00
Tax 0.00
Shipping Charges
TOTAL USD 99.00
Salesperson Contact Entry Date Ship Date Routing
900001 BD 04/11/13 Best Way
Your Visa xxxx1634 has been charged $ 99.00
For a total of*********$ 99.00
Answers to many questions about Apple Store orders can be found in the online
Customer Service section. Visit http://store.apple.com/ and click "Customer
Service" in the navigation bar near the top.
If you have a question about an iTunes Store gift certificate purchase that was
made through the Apple Store, please visit the online Help section for the iTunes
Store at http://www.apple.com/support/itunes/musicstore/musiccard/.
If you require assistance beyond what is available online, please contact the
iTunes Store Team using the email forms available in the Help section.Here is the link (at the bottom of the page there is a button) https://developer.apple.com/support/ios/enrollment.html When I click on it, I get redirected to the previous page https://developer.apple.com/contact/
Here is a link that sent me an e-mail to track order status. (Order No. 2442140328)https://secure2.store.apple.com/us/order/guest/2442140328/119607
I understand that it is not necessary to speak the information, but I'm in a desperate situation. -
Need help / Advice ; manage daily millions of records;;plz help me:)
Hi all,
I've only 2 years of experience in Oracle DBA. I need advice from Experts:)
To begin, the company I work for, decide to daily save in our Oracle database about 40 millions of records in our only table (User tables). These records should be daily imported from csv or xml feeds into one table.
This 's a project that need :
- Study the performance
- Study What is required in terms of hardware
As a leader in the market, Oracle 's the only DBMS that could support this size of data, but what's the limit of Oracle in this case? can Oracle support and manage perfectly daily 40 millions of records and for many years, ie We need all data of this table, we can't consider after a period that we don't need history: we need to save all data and without purge the history and this for many years i suppose!!! you can imagine 40 daily millions of records and for many years!!!
Then we need to consolidate from this table different views (or maybe materalized view) for each department and business inside the company, one other project that need study!
My questions 're :Using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0:
1-Can Oracle support and perfectly manage daily 40 millions of records and for many years?
2-Study the performance ; which solutions, technics could I use to improve the performance of :
- Daily Loading 40 millions of records from csv or xml file/files?
- Daily Consolidate / managing different views/ materalized view from this big table?
3- What is required in terms of hardware? features / Technologies( maybe clusters...)
Hope that experts help me and advice me! thank you very much for your atention :)1-Can Oracle support and perfectly manage daily 40 millions of records and for many years?Yes
2-Study the performance ; which solutions, technics could I use to improve >>>the performance of :Send me your email, and I can send you a Performance tuning metodology pdf.
You can see my email on my profile.
Daily Loading 40 millions of records from csv or xml file/files?DIrect Load
- Daily Consolidate / managing different views/ materalized view from this big table?You can use table partitions, one partition for each day.
Regards,
Francisco Munoz Alvarez -
I cant find my ipod plz help me, i cant find my ipod plz help me
so one stole it and they have it but wonht tell the real thing. so help me use locator to find my ipod
- If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
- You can also wipe/erase the iPod and have to iPod play a sound via iCloud.
- Change the passwords for all accounts used on the iPod and report to police
- There is no way to prevent someone from restoring the iPod (it erases it) using it.
- Apple will do nothing
Reporting a lost or stolen Apple product
- iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number -
Help adding a banner in dreamweaver cs3 plz help
Hi ive got this program to make banners, now when i load the banner up in dreamweaver its fine but when i load it on the internet the banner doesnt show up, what am i doing wrong?
heres the code for one of the pages with a banner.
ive attached a file aswell for an example it not working.
www.oakleytrainingcentre.comNot sure why your posts are coming in multiple lots - your last message came in three times.
Onto your colour problem. this is a personal opinion of course, but currently, the burgandy text behind the green in your header is very difficult to read. The added white dropshadow doesn't enhance the text, only makes it hard to read.
I would possibly make the header box white so that your logo and tagline stand out a lot more than they do. I would use the green/burgandy combination only as accents in your layout. Maybe a burgandy navigation bar, and use a solid green for the footer with which text. I would likely thrown in some blue or grey, both mix well with burgandy :-)
You may get more ideas for colourschemes from this site: http://www.colourlovers.com/palettes/top
Nadia
Adobe® Community Expert : Dreamweaver
Unique CSS Templates |Tutorials |SEO Articles
http://www.DreamweaverResources.com
Book: Ultimate CSS Reference
http://www.sitepoint.com/launch/005dfd4/3/133
http://twitter.com/nadiap -
HELP!My 4GB Nano is screwed,plz help!
The other day I tried swapping some albums for my nano but all that happened was all the songs on my pod were taken off! Now when I try and put music on my pod it only it says i hav used 3gb of memory but there is actually nothing on the nano!!!
I'm so annoyed coz now im back to the old cd and minidisc walkmans!
Any suggestions as to what to do would b very very much appreciated!Have you tryed Restoring your ipod.
-
i been trying to restore my ipod on itunes but a lil box always pops up saying that my ipod software update server cannot contacted i feel like i tryed everything idk what to do i need help
Try:
- Powering off and then back on your router.
-iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
- Change the DNS to either Google's or Open DNS servers
Public DNS — Google Developers
OpenDNS IP Addresses
- Try on another computer/network
- Wait if it is an Apple problem -
Very strange problem plz help////
user name == scott.
tablespace name == data and users.
data tablespace content approx.20 tables.
users tablespace content approx 5 tables.
both tables are under scott schema...
i want to reclaim data tablespace size..
so first i import complete tablespace data. as system user.
then after i want to drop data tablespace but i got error...
SQL> drop tablespace data including contents and datafiles;
drop tablespace data including contents and datafiles
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-02429: cannot drop index used for enforcement of unique/primary key
plz. sir help how can i drop this tablespace plz. help plz. plz. plz.Try
SQL> drop tablespace data including contents and datafiles cascade constraints;It seems that you have some referential integrity constraints, outside data tablespace, pointing to a table inside data tablespace. -
In my smart form why main's content din't display in print preview?Plz help
In my smart form why main's content din't display in print preview?Plz help me.
Regards
Indu
Moderator message: too vague, help not possible, please describe problems in all technical detail when posting again.
Edited by: Thomas Zloch on Jan 5, 2011 3:27 PMmake sure u've specified da style in output options of text element as
TIMES 10 in style field and select da desired paragraph and charcter format in general attributes tab of da text element.activaTE AND CHECK.
if problem still persists u can ask again.
reward points if it helps. -
Hi,
plz tell me the way to print text/data using printer in flex. I tried the FlexPrintJob class. but it takes object of a container to be printed & prints the visible content of that container(along with scrollbars), bt i want to print all contents of the container(including invisible).
I have tried to print bitmap image through FlexPrintJob but it takes lot of time for spooling... So plz help me out in printing(fast with all content) in flash
I am using flex 3 (flex Builder 3 IDE).
Thanks in advance!!!Hi Sagar,
Don't worry You can use the below work around to print all the contents of the Container including the invisible contents under scrolll with out scroll bar..
So what the idea here is we are seeting the container height to full size with out scrolls before sending the container object to printer and as soon as you print the object you are restoring it to the original height with scrolls...so that you can print the full contents without scrolls...
You may have doubt that by chnaging and restoring the size the user may see momentary resize of the container but it is not so as it is a fraction of a second and user cannot notice this change... Give it a try ..I had already run into this problem recently and I have found a work around for this which is as below:
// Here mainContainer is the container or box id the contents of which you want to print
private function doPrintContainer():void
var printJob:FlexPrintJob = new FlexPrintJob();
if(printJob.start() != true) return;
try
var mainContainerHeight:int = mainContainer.height;
//Increasing the height of the desired component to be printed.
mainContainer.height = mainContainer.measuredMinHeight;
mainContainer.verticalScrollPolicy = "off";
//Adding the resized Component to our FlexPrintjob and then sending the print request
printJob.addObject(this,FlexPrintJobScaleType.MATCH_WIDTH);
printJob.send();
//Resizing the component back to normal size
mainContainer.height = mainContainerHeight;
mainContainer.verticalScrollPolicy = "auto";
catch(error:Error)
trace("Error : " + error.message);
If this post answers your question or helps, please kindly mark it as such.
Thanks,
Bhasker Chari
Maybe you are looking for
-
After updating to 10.6 ATV only offers to sync photos
I did a clean install of 10.6 on my imac, and now the only syncing option that comes up in itunes for my ATV is for photos. Do I really need to erase everything on the ATV to sync it to the new computer? The itunes library is the same... I thought it
-
N73 Firmware 4.0812.4.0.1 Available
N73 Firmware 4.0812.4.0.1 Available N73 Internet Edition 0539366: Hong Kong IE 0539364: Taiwan IE N73 Standard 0529813: TAIWAN (Deep Plum) 0529814: HONGKONG (Deep Plum) 0529815: APAC 1 (Deep Plum) 0529816: PHILIPPINES (Deep Plum) 0529817: AUSTRALIA (
-
Function Module Get Conf by PO number
Dear Expert, I would like to get Confirmation number by PO Number. Please let me know what the Function module should I use in SRM example : I have a PO number, I want to know the confirmations number related for these PO number Many Thanks
-
I have downloaded the latest version of icloud control panel to a PC with Windows 7. My "master" data is always on my PC. With other synch software I always select "One Way Outlook to Device". I synched icloud with Outlook and it has trashed my Outlo
-
Auto selecting of adjacent photo when filter is activated
Lets say you have 100 photos in a folder. Photo nr 51 has a red label and all the other photos have a green label. Photo nr 51 is the selected one. Now when I turn on the filter for the green labeled photos the first photo in the folder is selected.