HELP !!! How to access to printDialog properties ?

I really need help !!! I have to know how I can access to the printDialog of the PrinterJob class to set the printer by code. I searched nearly everywhere but have never found the way... Should I try by using an AttributeSet in which I may specify a PrinterName attribute or has someone a different and easier way to choose the printer by code ?
Thanks for answering !!

You can use PrintRequestAttributeSet to set the printDialog properties.
eg :
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(new JobName("My Application", null));
aset.add(OrientationRequested.LANDSCAPE);
aset.add(new MediaPrintableArea(0.5f,0.5f,7.5f,10.0f,MediaPrintableArea.INCH);
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setPrintable(component);
if(printJob.printDialog(aset))
printJob.print(aset);
}

Similar Messages

  • HELP : How to access a datasource rowset in the AM class ?

    Hi,
    i have an AM "TestAM" which contains the viewobject "ViewTest".
    in the class "TestAMImpl.java" i added a method called "verify()".
    in my JSP i have initialised the AM and a datasource based on the VO "ViewTest" :
    <jbo:ApplicationModule id="am" configname="TestAM.TestAMLocal" releasemode="Stateful" />
    <jbo:DataSource id="ds" appid="am" viewobject="ViewTest" />
    <%
    TestAM am = (TestAM) am.useApplicationModule();
    String Message = am.verify();
    %>
    My question is how to access to the rowset of the datasource "ds" in the code of the method
    "verify()" ?
    public class TestAMImpl extends ApplicationModuleImpl implements TestAM {
    public String verify()
    How to access the rowset initialised in the JSP???????????
    Thanks for your help

    This is correct. Think of the AM as having a hashtable of instances of view objects that you can lookup by instance name.
    The <jbo:DataSource> tag lets you lookup an instance by name in the AM and get a reference to it to use in the JSP page. Within your AMImpl class, you can either:
    [list]
    [*]Call findViewObject("YourViewInstanceName"), or
    [*]Just call the generated getYourViewInstanceName() method which is ok to call inside the Impl class to get hold of the same VO.
    [list]

  • How  to access style related properties ?

    Hi All,
    how  to access applied live drop shadow of the art item in the plugin?
    is any direct API available in adobe sdk .
    currently i am using adobe cc.
    Thanks in advanced.
    Regards
    Ashish.

    Live Effects are stored in the dictionary for the art, and it varies by effect. I suggest grabbing this tool (I wrote it):
    Debug Dump Tool
    You should be able to use that to examine the dictionary of art with the Live Shadow effect on it. If its not obvious what's what, just dump the dictionary, change one of the parameters to a different value, and then dump it again.

  • How to access VPN Connection properties in Win 8.1

    Win 8.1 pro 64 bit
    I setup a VPN connection to my company host server. When I try to connect, I get no EAP protocol installed on the Win 8.1 system. I googled and it said to open VPN properties (like I have done before); however, I cannot find the open VPN properties function.
    I right click on the VPN and it does nothing. It did work in win8. How do I get to VPN properties to add EAP to the VPN connection?
    THX
    John Lenz

    To access to your VPN properties you should navigate to Control Panel > Network and Internet > Network Connections. From there, you will see all of your network connections, including any existing VPN connections. If you right click on the VPN connection
    in question, you will see "properties" listed at the bottom of the list and EAP settings can be modified under the security tab.  Let me know if you have trouble.   

  • How to access Subsequences/callees properties?

    Is there any method to access properties or variable directly from caller to callee, without using parameter and global variable?

    Hi km9394,
    Yes, RunState.SequenceFile.Data.Seq[0] (this is usually the MainSequence).
    Therefore if you ahave a sequencefile with two sequencecalls eg MainSequence and SubSequence. Then the expression called somewhere in MainSequence
    'RunState.SequenceFile.Data.Seq[1].Locals.MyBoolean = True' will set the local boolean in SubSequence.
    I have attached an example. In the MainSequence a step changes the value of Locals.MyResult in SubSequence from 10 to 16.
    But once this has been changed it will always be set to 16. I haven't changed the ChangeCount so thats why the editor doesn't think the sequencefile has been changed.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    Debug_Example7.seq ‏30 KB

  • [help] how to access SAP web services by NetBeans

    i have created a "web application" project. and i have created a "web service client" file by WSDL file.
    but when i test after i inserted web service operate codes into index.jsp, the tomcat print a error means "HTTP 401 - Unauthorized".
    if i access the ws url by browser, it will popup a dialog for username and password. but NetBeans not.
    i installed NetBeans full version, include tomcat. and the WSDL file is generated by SAP.
    need help.

    Exception printStackTrace
    com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized
    com.sun.xml.ws.transport.http.client.HttpClientTransport.checkResponseCode(HttpClientTransport.java:232)
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:151)
    com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:88)
    com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
    com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
    com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
    com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
    com.sun.xml.ws.client.Stub.process(Stub.java:248)
    com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:134)
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:244)
    com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:224)
    com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117)
    $Proxy27.zbjdaFmMd0H(Unknown Source)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:94)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    java.lang.Thread.run(Thread.java:619)
    Wed Oct 15 14:26:54 CST 2008
    com.sun.xml.ws.client.ClientTransportException: request requires HTTP authentication: Unauthorized

  • HOW TO ACCESS MY VISION INSTANCE GLOBALLY?

    Dear legends,
    Since i have installed a VISION INSTANCE 12.1.1 and i have a domain name, and my entries as follows OS : ORACLE LINUX 5.7 x86_64
    OUR ORGANISATION'S IP EXAMPLE
    IP FOR THE MACHINE USING : 192.168.1.1
    SUBNET MASK : 255.255.255.0
    DEFAULT GATEWAY : 192.168.1.10
    PRIMARY DNS : 50.51.52.53
    SECONDARY DNS : 300.200.100.1
    vi /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    BOOTPROTO=static
    BROADCAST=192.168.1.xxx
    HWADDR=xx:xx:xx:xx:xx:xx
    ONBOOT=yes
    TYPE=Ethernet
    USERCTL=no
    IPV6INIT=no
    PEERDNS=yes
    IPADDR=192.168.1.1
    NETMASK=255.255.255.0
    NETWORK=192.168.1.0
    #GATEWAY=192.168.1.10
    vi /etc/sysconfig/network
    NETWORKING=yes
    NETWORKING_IPV6=no
    HOSTNAME=devl.rel.net -- example hostname
    GATEWAY=192.168.1.10
    cat resolv.conf
    # Generated by NetworkManager
    search rel.net
    nameserver 50.51.52.53 -- example DNS 1 or primary DNS
    EITHER i give or edit all the above mentioned files to access my EBS home page using the url http://devl.rel.net:8000/ i cant able to access the page but other sites can be browsed, since at the time of installation of oracle linux i have given the hostname as devl.rel.net and our domain name is rel.net.
    Please can anyone help how to access my EBS globally. I have accessed the EBS login page for the first time at the time of installation only after that i cant able to access. Instance is working fine, everything has been started. I have pinged the same url ping devl.rel.net it says 0% packet loss from a terminal.
    Lots of thanks and Great help would be appreciated more.
    With Regards,
    Karthik Singh

    Hi,
    As per your request I have posted here HOW TO ACCESS MY VISION INSTANCE GLOBALLY?
    Thanks a lot

  • How to access client specific data in VC through BAPI

    Hi Experts,
         I am Using BAPI to insert the values  in to the back end system from a form, But the values are not getting inserted in to the back end system. BAPI developed is in client 100 but through VC i am able to get the values only from client 800. can any one of you help how to access the data from client 100 in VC.
    Regards,
    Lakshmi

    Hi Prachi,
          Your answer is really very helpfull to me thanks a lot for your reply, but the data hasn't been entered in to back end system in client 800 also.In VC just i took the BAPI and from the input port of BAPI i have dragged and select ADD form then the UI elements had automatically added in to the form,now when i entered the values in the form and submit the values are not entered in to the back end system. I am not knowing where the error is.can you please help me out in this
    Thanks and Regards,
    Lakshmi.

  • How to access the jpanel and other components on click of a button

    hi ,
    need help,how to access the components of a frame onclick of a button ,if the actionPerformed() is written in a seperate class.
    in my code
    button.addActionListener(new Xyz());
    Xyz is implementing the ActionListener.
    in actionPerformed() i want to access the components in the frame.
    thanks.

    public class Xyz implements ActionListener{
      JFrame frame;
      Component[] comps;
      public Xyz(JFrame f){
        frame = f;
        comps = frame.getContentPane().getComponents();
      public void actionPerformed(ActionEvent e){
        // access elements in comps array
    button.addActionListener(new Xyz(this)); // if 'this' is a JFrame in question

  • How to access properties of symbols in loaded SWF?

    I'm making the migration from Flash to Flex, but I'm running
    into a dead end on one particular area: accessing and manipulating
    properties of symbols in a loaded SWF.
    The SWF is actually a simple library of a detailed parts
    illustration. I would like to load the entire SWF in position, and
    be able to change the attributes (i.e. colors) of individual
    symbols (or parts of the illustration). I can load, display and
    manipulate each symbol separately, but I need the parts to remain
    in place.
    The original art was created in Illustrator and exported as
    SWF using the symbols palette.
    I can always go back to Flash, but I'm forcing myself to move
    forward and do this project in Flex (baptism by fire!!).
    Is there some sort of dot notation to access the symbols from
    within the SWF, without loading them all separately?
    Let me put this another way: it appears that I can load an
    SWF and then instantiate each symbol in that SWF, and then load
    each symbol to the 'stage' (or whatever it's called in Flex)
    separately.
    I can certainly instantiate each symbol separately, and then
    align it on stage, but it seems to me to be bass-ackward to do it
    that way, expecially since I created the original SWF with
    everything in position.
    Is there no way to access the attributes of the individual
    symbols within an SWF without separately instantiating them?
    I'm just having trouble getting my head around this. Any help
    is greatly appreciated.

    Okay, I took a look at this info and it's what I was already
    doing.
    Here's a simplified example of what I'm trying to do, using
    the example in the swf9.pdf file.
    Let's assume I've created a SWF with a "BlueSquare" movieclip
    (in the symbols panel in Flash, exported for AS). In that clip,
    there is another symbol called "Star". I import the SWF and
    BlueSquare symbols in with the following code:
    <mx:Script>
    <![CDATA[
    [Embed(source=”../assets/circlesquare.swf”)]
    [Bindable]
    public var LogoCls:Class;
    [Embed(source=”../assets/circlesquare.swf”,
    symbol=”BlueSquare”)]
    [Bindable]
    public var LogoClsBlueSquare:Class;
    </mx:Script>
    If I instantiate the BlueSquare on stage, it includes the
    Star symbol when previewed, but I can't figure out how to get at
    the Star symbol to change color. If I apply a color change to the
    symbol, it changes the entire BlueSquare symbol.
    If I instantiate the Star symbol separately, I can then
    position it on the stage and make changes, but that requires
    positioning it with actionscript. I'm trying to not have to
    position a sub-element of my actual artwork because of it's
    complexity.
    I'd like to display the main movieclip (or sprite) with the
    ability to access the attributes of a sub-movieclip or
    sprite.

  • As a new MacBook user I plug in my USB Flash Drive but don't know how to access its contents. Please help. Thanks.

    as a new MacBook user, when inserting my USB Flash Drive, I do not know how to access its contents. Please help. Thanks.

    Open a new Finder window, Finder > File > New Finder Window, and it should appear on the left under Devices.
    If you don't see it there, or to get it to show up on the Desktop: Finder > Preferences... General tab, check External disks to have it show on the Desktop,  Or Sidebar tab, check External disks under DEVICES.

  • Nokia Lumia 928 apparently died after an attempted Windows 8.1 update.  Replacement phone arrived the next day.  How can I restore my contacts, photos, etc.?  Backup assistant is no help and I don't know how to access the Cloud.

    Nokia Lumia 928 apparently died after an attempted Windows 8.1 update.  Replacement phone arrived the next day.  How can I restore my contacts, photos, etc.?  Backup assistant is no help and I don't know how to access the Cloud.

    Did you have the phone set to backup things to the One Drive on Microsoft servers?

  • How to access custom properties on JavaBean DC attributes

    I created a DC from a Java class and defined some custom properties on one of its attributes.  How can I access these custom properties through EL?  I don't see the custom properties in the Expression Builder.

    Hey Frank
    Sorry for the sparse description.  By custom properties I mean the ones you can add through the "Custom Properties" tab in the same editor that also lets you edit the UI Hints.  This is the editor that opens when you try to edit an accessor on a data control from the DataControls.dcx viewer.  In my case, I have a TestDC data control that exposes an "employees" collection of type Employee.  Employee has the attributes "startDate", "name", and "age" which are of type java.util.Date, java.lang.String, and java.lang.Integer, respectively.  In the DataControls editor, I select the "employees" accessor and click on the pencil icon.  This opens the editor for the Employee.xml file (root element is PDefViewObject, always appears in a persdef package).  From the Overview, click on Attributes, and you'll see the Custom Properties tab below the list of attributes.  I added some properties here for one of the attributes but I don't know how these are supposed to be accessed through EL.
    Here are two screenshots in case my written description sounds confusing.
    http://imgur.com/F6XSLgl
    http://imgur.com/oHWIdCA

  • How to access custom properties in .vm file

    Hi,
    I have created custom property for screen using File -> Project Properties.
    This property apply to one of my screen.
    If I want to access the value of the custom property in .vm.
    How to access that value. I tried using screen.getTest() but it doesn't return anything for me.

    Hi Peter,
    I followed the steps.
    1)created custom property
    2)assign that custom property using right click on screen and assign some value
    eg. custom property name - Test
    and value as "abc"
    i need abc in vm file.following my vm file
    it's not working
    <input type="text" id="a1" name="a1" value="${screen.getProperties().get("Test")}" tabindex="6" size="30" >
    #set ( $value = $screen.getProperties().get("Test") )
    <input type="text" id="a1" name="a1" value="$value" tabindex="6" size="30" >
    #if( ${control.isVisible()})
         #if( ${control.getButtonClass().equals("submit")} )
              <input class="btn" type="button" value="Back" tabindex="#tabIndex()" onclick="javascript:back()">
         #end
         #if( ${screen.getProperties().get("Test").equals("mahesh")} )
         <input class="submit" id="submit" name="submit" type="submit" value="Submit" alt="Submit" tabindex="12">
         #else
    <input class="${control.getButtonClass()}" id="${control.getEncodedID()}" name="${control.getId()}" type="submit" value="${control.getText()}" alt="${control.getText()}" tabindex="#tabIndex()">
         #end
    #end
    #if( ${control.getButtonClass().equals("submit")} )
    </div>
    #end
    Edited by: 848231 on May 18, 2011 3:00 AM

  • In iTunes, I have a number of tones stored.  I don't know how to access them to add to listed people on my iPhone. I would appreciate any help.

    In iTunes, I have a number of tones stored.  I don't know how to access them to add to listed people on my iPhone. I would appreciate any help.

    Drap and drop the tones from iTunes onto the phone. Select the contact you wish you add the tone to. Click edit and select ringtone.

Maybe you are looking for

  • Debit memo can not be created

    Hi All, We have an issue regarding debit memo. Actually we have created a sales order for $600. But due to internal issues that company code not supposed to have any A/R. So we created a credit memo but with incorrect amount of $540. So again we trie

  • Lumia 925 to nokia xl dual sim.

    i like to transfer my contacts/sms/etc from my nokia lumia 925 to nokia xl dual sim, is it possible? if can, how? at least i want the sms.... thanks.

  • XBOX 360 with Apple Airport Express/AIrport Extreme?

    Well im about to buy an apple airport extreme wireless router for my house. The router is going to be located on the second floor with my cable modem. Planning to put my airport express in my room on the third floor. So i am just wondering if you can

  • Mac Book Pro has blinking folder and will not start.

    MY Mac Book Pro mid 2010 has the blinking folder and is froze, I have entered into the Internet recovery mode and tried to reinstall OSX system.  And in the Disk Utility there is no hard drive to select.   What is the next step?  

  • Optimizing Experience of Family Router and Apple Devices

    I'm very much a layman, but I've been doing a ton of research the past couple weeks on the following topics for optimizing my Apple World.  I know a lot more about basically what these terms mean and this stuff is, but honestly, the way it all effect