PrintDialog tabs

Hello all,
I was exploring the Java Print tutorial trail. I began with HelloWorldPrinter.java, the print dialog displays 3 tabs: General, Page Setup, Appearance. On the General tab, the button with label "Properties" is disabled. On the Apperance tab, the radio button group titled "Color Appearance" has 2 radio buttons: Monochrome (disabled), Color (enabled, this is weird because my printer is not a color printer); another radio button group tittled "Quality" has 3 radio buttons: Draft, Normal, High (all disalbed).
Why are those buttons diabled, how can one enable them?
Thank you for your help!
My JDK version is 1.5.0_06 running on RedHat linux. Below is the code listing of the HelloWordPrinter.java:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.print.*;
public class HelloWorldPrinter implements Printable, ActionListener {
    public int print(Graphics g, PageFormat pf, int page) throws
                                                        PrinterException {
        if (page > 0) { /* We have only one page, and 'page' is zero-based */
            return NO_SUCH_PAGE;
        /* User (0,0) is typically outside the imageable area, so we must
         * translate by the X and Y values in the PageFormat to avoid clipping
        Graphics2D g2d = (Graphics2D)g;
        g2d.translate(pf.getImageableX(), pf.getImageableY());
        /* Now we perform our rendering */
        g.drawString("Hello world!", 100, 100);
        /* tell the caller that this page is part of the printed document */
        return PAGE_EXISTS;
    public void actionPerformed(ActionEvent e) {
         PrinterJob job = PrinterJob.getPrinterJob();
         job.setPrintable(this);
         boolean ok = job.printDialog();
         if (ok) {
             try {
                  job.print();
             } catch (PrinterException ex) {
              /* The job did not successfully complete */
    public static void main(String args[]) {
        UIManager.put("swing.boldMetal", Boolean.FALSE);
        JFrame f = new JFrame("Hello World Printer");
        f.addWindowListener(new WindowAdapter() {
           public void windowClosing(WindowEvent e) {System.exit(0);}
        JButton printButton = new JButton("Print Hello World");
        printButton.addActionListener(new HelloWorldPrinter());
        f.add("Center", printButton);
        f.pack();
        f.setVisible(true);
}

those buttons you've mentioned will be enabled/disabled depending on the selected Print Service (in the General Tab). Try changing you selection and see how they behave.
;o)
V.V.

Similar Messages

  • Tabs in the Printout

    Hi i m using .. \t to seperate different colums. I dont want to use a table or a list as the program is very simple, all i want is that output shud look well formatted & aligned, with a tab separation.
    On screen it looks OK , but when i print it , "/t" is not recognized & a junk character is printed instead.
    I m using j2sdk1.4.
    if ( output == 2 )
    results = results + "\n Station\t MR \t\t z[i] \t\t dz[i] \n" ;
    results = results + " \t(psi)               \n";
    So there is actually a TAB between, Station & MR above, but /t is just replaced by a junk character,because of which Station & MR almost stick to each other.
    Also, when i save this as a text file, & then Print it, It prints properly.
    Thanks
    -prk

    This is the code I am using to print:
    import java.awt.*;
    import java.awt.print.*;
    public class SimplePrint implements Printable {
    private String stringToPrint;
    public SimplePrint() {
    this("This is the \t Default String. \t \t Go\t\t Blues!!!");
    public SimplePrint(String stringToPrint) {
    this.stringToPrint = stringToPrint;
    public int print(Graphics g, PageFormat pf, int pageIndex) throws PrinterException {
    if (pageIndex >= 1) {
    return Printable.NO_SUCH_PAGE;
    g.setFont(new Font("Helvetica", Font.PLAIN, 18));
    g.setColor(Color.black);
    g.drawString(stringToPrint, 100, 100);
    return Printable.PAGE_EXISTS;
    public static void main(String[] args) {
    // Get a PrintJob
    PrinterJob pj = PrinterJob.getPrinterJob();
    Printable painter;
    // Specify the painter
    if (args.length == 0) {
    painter = new SimplePrint();
    } else {
    painter = new SimplePrint(args[0]);
    pj.setPrintable(painter);
    // Show the print dialog
    if (pj.printDialog()) {
    try {
    pj.print();
    } catch (PrinterException pe) {
    System.out.println("Exception while printing.\n");
    pe.printStackTrace();
    new PrintPreview(painter, "Print Preview - SimplePrint");

  • Image Processor Tab Missing in New Adobe Bridge CC 2014

    In the new Bridge CC you used to have a TAB under tools called Photoshop which you could run the script Image Processor for easily processing jpegs. What has happened to this and is their maybe a new way of processing jpegs to lo-res that I dont know about from tiff or jpeg or does my bridge have a problem?
    I have attached a image grab from my bridge that shows that the tab is not there. I know that you can access image processor directly from Photoshop, but they used to always be linked.

    No, it is still in Bridge CC.
    Did you uninstall Photoshop CC after installing Photoshop CC 2014? If so, that may have removed some of the Bridge integration scripts by mistake. Re-installing Photoshop CC 2014 should replace the scripts.
    and it should give the image processor tab back

  • Logical Level in Content Tab

    Hi,
    What is the use of Logical Level under Content Tab in Logical Table Source?
    Need more information, docs related to this
    Thanks,
    Satheesh

    Hi
    This logical level is useful for level bases metrics.It shows the levels in your hierarchy.We can give the level in this and in the report it shows the data for that level only.
    See this lnk, http://gerardnico.com/wiki/dat/obiee/measure_level_based
    Thanks
    Don

  • Images for tabs are not getting displayed in the page

    Hi,
    I have given images for tabs on a page. when iam applying images from the local disk, it is showing the images in edit mode. But when I view the page, it is not showing any images.
    Where should i copy the images I use in my pages. I ahev copied all the images in the images directory of portal30 in server.
    Please help.
    Murthy

    Hi,
    Please check the httpd.conf file in your server for /images alias. The /images alias will point to a directory. Copy your
    image files in that directory.
    Thanks,
    Sharmila

  • How do I use Panorama / Tab Groups with the keyboard?

    Yes I know that CTRL-SHIFT-E opens the panorama window, and then I can use the mouse to organize my tabs into groups.
    But how do I do this with the keyboard?
    I've [http://lifehacker.com/#!5719596/switch-between-tab-groups-in-firefox-with-a-keyboard-shortcut read] [http://ubuntuforums.org/showthread.php?t=1705714 that] Ctrl-`should move me through tab groups. That doesn't work for me on my Danish keyboard. (Where the ' and ` chars are weird. But is how they are on a valid standard Danish keyboard) I've tried changing the keyboard to USA and then moving through tab groups works fine.
    In short: Pretend I don't have a mouse. How do I use Panorama / Tab Groups?

    Sorry. These are both known bugs:
    [https://bugzilla.mozilla.org/show_bug.cgi?id=587010 Bug 587010] - Add keyboard UI for manipulated groups and tabs in Tab Candy
    and
    [https://bugzilla.mozilla.org/show_bug.cgi?id=626594 Bug 626594] - shortcut for switching tab groups is badly accessible on many non-US keyboard layouts

  • My downloaded text sounds do not show up under the sounds tab in settings after installing 8.1.1. can someone help me please?

    i downloaded a couple text tones and since installing 8.1.1, they will not show up under the sounds tab. in fact, they do not show up in my recent purchases on itunes, but when i go to buy them again, it says that i have already bought this tone. I just want to use the tones i paid for as the tones on my phone. not asking much.... thanks for the help. i hope someone can help me get the tones working. thank you.

    This was happening to me too but only for some of my songs. I have a mac so I dunno about PCs, but for most of my ringtones I had to create an ACC version in itunes to make them short enough then turn that into a m4r and those all worked fine. But if the song was already short enough and I didn't create an ACC version and just turned the original into a m4r, then it wouldn't appear in my itunes.
    so if you're on a mac:
    1. go to get info, options, pick when you want the song to start and end.
         Has to be pretty short to work, 30 second or less is good
         if it's already short enough that's fine
    2. right click and click 'create ACC version'
         a copy with the length you put in will appear, drag that into a folder or whatever and just type in m4r where m4a would be
         still make an ACC version even if it's the right length
    Hopefully this helps someone else.

  • Jabber 9.2.6 - No Phone Tab

    When clicking on the message icon in jabber we get an error message stating the user is not signed in, to resolve goto the phone accounts tab under the options window, we have no such tab showing, anyone help?

    Neither CUCM nor CUC are SSO-integrated with Active Directory in the current shipping versions to say nothing of Jabber itself. All LDAP Auth in the server does is relay the user-provided credentials to the LDAP server for a go/no-go decision. The user/client is still responsible for providing them to whatever Cisco server it's trying to authenticate to. The XML Jaime mentions above instructs Jabber to copy/paste the credentials you entered when logging into Jabber itself into the PhoneService (i.e. CCMCIP) and Voicemail (a separate element).
    Please remember to rate helpful responses and identify helpful or correct answers.

  • When I login to my homepage yahoo, why does a paypal tab open next to yahoo, and will it harm anything?

    When I log on to Mozilla, my homepage is Yahoo, but next to the yahoo tab on the left is a small tab with the paypal logo, will this harm anything, and can it be stopped?

    You may have "pinned the tab". Right click on it and unpin the tab to make it go away.

  • When I login to a forum, it only holds true for the tab I currently have open

    Until recently, if I logged into a forum, I could open pages within that forum in multiple tabs and still be logged in on every tab. Now I can't, a new tab requires me to login again. I have always used "always start firefox in private browsing mode" and have made no changes in the settings.

    Your plugins list shows outdated plugin(s) with known security and stability risks.
    *Java Plug-in 1.6.0_13 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp#jdk (you need JRE)

  • I used to be able to open links in a new tab by clicking my middle mouse button, but now that I've updated it to the most recent update it doesn't work anymore. How do I fix this? I really love that feature. It works in IE and Chrome but not Mozilla.

    Ok, I used to be able to open links up in a new Tab using my middle mouse button. However, I updated firefox with the automatic Updates on the 26th of October and now I no longer can open links with my middle mouse button. Why? I use this feature just about every time I go searching on the internet so I really would like it back. I couldn't find anything that it was related to in the options so I turn this over to you guys.

    Do you have that problem when running in the Firefox SafeMode? <br />
    [http://support.mozilla.com/en-US/kb/Safe+Mode] <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    If not, see this: <br />
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems n

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

    Since installing LTR 5.4, which I've now upgraded to 5.6, I've encountered repeated slowness and malfunctions in operations, especially when using the Compare View function and the Tab key to open and close the right and left side panels.  Such problems never arose during two years of using LTR-4 and nothing else has changed on my computer.  I have a pretty simple system with only a few plug-ins, which are usually not in operation.  I have 12GB of RAM in my Windows 7 PC.  I could illustrate these problems with screen shots if you would tell me how to submit screen shots.  Otherwise I will try to describe the problems in words.
    The problem is clearly cumulative, growing worse as usage time passes.  Compare View feature gradually slows down and eventually seems to choke as my work session proceeds. If I Exit LTR and re-enter and start all over, things will work normally for maybe 30 minutes, but then the Compare View feature begins to become very slow to respond.   In a recent example with my screen full of thumbnails in Library mode I highlighted two images to compare. LTR started to open the Compare View screen by first having the top row of thumbnails disappear to be replaced by the "SELECT" and "CANDIDATE" words in their spaces  (but no images), but Compare View never succeeded in gaining control of the screen. After some seconds the top row of thumbnails reasserted its position and the Compare View windows disappeared. But LTR kept trying to bring them back. Again the top row of thumbnails would go away, Select and candidate would reappear, try again, and give up. This went on for at least 2-3 minutes before I tried to choose File and Exit, but even that did not initially want to respond. It doesn't like to accept other commands when it's trying to open Compare View. Finally it allowed me to exit.
    To experiment I created a new catalog of 1100 images.  After 30-40 minutes, the Compare View function began to operate very slowly. With left and right side panels visible and two thumbnails highlighted, hitting Compare View can take half a minute before the two mid-size  images open in their respective SELECT and CANDIDATE windows. When the side panels are open and two images are in the Select/Candidate spaces, hitting the Tab button to close the side panels produces a very delayed response--25-30 seconds to close them, a few more seconds to enlarge the two images to full size. To reverse the process (i.e., to recall the two side panels), hitting Tab would make the two sides of the screen go black for up to a minute, with no words visible. Eventually the info fields in the panels would open up.
    I also created a new user account and imported a folder of 160 images. After half an hour Compare View began mis-placing data.  (I have a screen shot to show this.)  CANDIDATE appears on the left side of SELECT, whereas it should be on the right. The accompanying camera exposure data appears almost entirely to the left of the mid-screen dividing line. Although the Candidate and Select headings were transposed, the image exposure data was not, but the data for the image on the right was almost entirely to the left of the line dividing the screen in two.
    Gurus in The Lightroom Forum have examined Task Manager data showing Processes running and Performance indicators and they see nothing wrong.  I could also send screen shots of this data.
    At this point, the only way I can process my images is to work 30-40 minutes and then shut down everything, exit, and re-start LTR.  This is not normal.  I hope you can find the cause, and then the solution.  If you would like to see my screen shots, tell me how to submit them.
    Ollie
    [email protected]

  • When clicking on links that open in a new window, the links don't open and Firefox freezes in a way. I can navigate the page I am on but cannot click to open a new tab or bookmark.

    When navigating the internet, if I come across a web page that has a link to open a picture or program in a new window, if I click on it, it does not open. Firefox immediately looses functionality in that I cannot open a new tab with the mouse wheel, right click to open a new tab, or use my bookmarks in either the drop down or toolbar to navigate away. I can usually still navigate the page that I am on, for example, (https://loanconsolidation.ed.gov/AppEntry/apply-online/appindex.jsp), when it freezes I cannot click on any of the content at the center of the page but I can still use the links from the list on the far left. For an example of the pictures, (http://www.insect-sale.com/), if you click on "New Arrivals" at the top of the page it takes you to a list of products that can only be viewed by clicking on them. Usually a picture of the item would open in a small window but it does not and Firefox freezes. This has also happen when I try a view a degree audit on a school's website where a program would usually open in a new window. The only thing I have been able to find that still functions properly when this happens is the home page button. I can click on it or use the wheel to open it in a tab just fine, but if I try and go anywhere else I cannot. The only way I can get Firefox back to normal is to use the Task Manager and end the process. Another thing I have noticed, that may or may not be related; is that my Norton Internet Security toolbar, that should show up below the bookmarks toolbar and above the tabs, only shows up about 1 out of every 10 times I open Firefox. Some days it doesn't show up at all. If it does show up and I log into Identity Safe, the autofill for the programed website works, even if the toolbar doesn't show up the next time I open Firefox.

    Go to Tools->Options->Apps
    Here you should see two columns: Content Type on the left, Actions on the right.
    Find and select excel spreadsheet or any other content type in the left column. There should be a corresponding action in the right column. What is it? You can use the drop-down list to select the option you want:
    Always Ask - Firefox will ask each time: What do you want to do with this file?
    Save file - Firefox will save this file to your computer
    Use - Firefox will give this file to the program to open it
    In case of saving, Firefox will either prompt you every time where you want the file to be saved, or save it to the default location. It depends on the preference in
    Tools->Options->General->Download

  • It doesn't open new tabs or windows when I click on then. it gives a problem loading page quite a bit, what's wrong?

    When i open it it takes a long time to open, when I go to mail, or other places. it opens a Server not found
    Firefox can't find the server at us.mg5.mail.yahoo.com
    Check the address for typing errors such as
    ww.example.com instead of
    www.example.com
    If you are unable to load any pages, check your computer's network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
    All this when I click on a button or do a search in Fire Fox.
    It seems like I have to play with it to open anything.
    I went back to the normal Fire Fox and it's still happening.
    I sometimes have to restart my computer to get the buttons in the mail to show up or Face Book to work right.

    <u>'''Kill Application'''</u>
    In Task Manager, does firefox.exe show in the <u>'''Processes'''</u> tab?
    See: [http://kb.mozillazine.org/Kill_application Kill Application]
    '''<u>Causes and solutions for Firefox hanging at exit:</u>'''
    [[Firefox hangs]]
    [http://kb.mozillazine.org/Firefox_hangs#Hang_at_exit Firefox hangs at exit]
    [[Firefox is already running but is not responding]]
    <u>'''Safe Mode'''</u>
    You may need to use '''[[Safe Mode]]''' (click on "Safe Mode" and read) to localize the problem. Firefox Safe Mode is a diagnostic mode that disables Extensions and some other features of Firefox. If you are using a theme, switch to the DEFAULT theme: Tools > Add-ons > Themes <u>'''before'''</u> starting Safe Mode. When entering Safe Mode, do not check any items on the entry window, just click "Continue in Safe Mode". Test to see if the problem you are experiencing is corrected.
    See:
    '''[[Troubleshooting extensions and themes]]'''
    '''[[Troubleshooting plugins]]'''
    '''[[Basic Troubleshooting]]'''
    If the problem does not occur in Safe-mode then disable all of your Extensions and Plug-ins and then try to find which is causing it by enabling <u>'''one at a time'''</u> until the problem reappears. <u>'''You MUST close and restart Firefox after EACH change'''</u> via File > Restart Firefox (on Mac: Firefox > Quit). You can use "Disable all add-ons" on the Safe mode start window.

  • How can I enable the center mouse click to open and close tabs in Firefox and Chrome?

    I have a MacBook Pro Model A1261 purchased in 2009. On my other mac at work (and my PC) I can center click to open a link in a new tab while in Chrome or FireFox, and also to close a tab by clicking on it in the tabs at the top. I am using an external USB mouse on my MacBook Pro and when I click the center scroll wheel it brings up the dashboard. I looked in the settings but wasn't able to find a way to change that setting for the center button to open and close tabs in my web browser. Is there a way? Please help!

    You can restore the zoom feature by changing the values of the related prefs on the <b>about:config</b> page.
    * browser.gesture.pinch.in -> <b>cmd_fullZoomReduce</b>
    * browser.gesture.pinch.in.shift -> <b>cmd_fullZoomReset</b>
    * browser.gesture.pinch.out -> <b>cmd_fullZoomEnlarge</b>
    * browser.gesture.pinch.out.shift -> <b>cmd_fullZoomReset</b>
    * browser.gesture.pinch.latched -> <b>false</b>
    *http://kb.mozillazine.org/about:config
    See also:
    *pinchy: https://addons.mozilla.org/firefox/addon/pinchy/

Maybe you are looking for

  • How to add line items to Accounting Document posted through MIRO ?

    I need to perform Additional posting when Posting through MIRO transaction..i tried with INVOICE_UPDATE BADI but this was not useful...Please let me know if there is any way to add additional posting to Accounting Document created through MIRO. If an

  • How to span vlans across core layer in core/distribution/access campus design?

    Hi, I studied Cisco Borderless Campus Design Guide 1.0 (http://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/Campus/Borderless_Campus_Network_1-0/Borderless_Campus_1-0_Design_Guide.html) last week because we plan to redesign our campus backbone

  • AICC Course Completions are not writing back to LSO

    We are on LSO 602 and we have both SCORM and AICC courses.  We have implemented the Single SCO Badi w/ the sample code that was provided.  This has helped solve the problem w/ the Single SCO completion progress, but we are having problems now w/ the

  • Sync BOTH Aperture & iPhoto library

    Hello! Is there a way to sync both Aperture & iPhoto library onto an iDevice? I know that I can import the iPhoto library to Aperture but this does not solve my problem. I update both libraries separately as I use Aperture for RAW images which were t

  • Delivaery Date in MRP PR

    Hi All, How the delivery date is calculated in MRP generated? Here is the scenario: We have planned del time in material master is 14 days, GR processing time is 2 days. PR has created on 23 Nov 2011, and it gave the delevery date 28.12.2011 how? FYI