Accessing JMenu through JMenuItem

How can I get access to the JMenu object having only JMenuItem contained in it?
JMenu menu = new JMenu("Menu");
JMenuItem menuItem = new JMenuItem("Menu Item");
menu.add(menuItem);
// Here I have only reference to 'menuItem'
Thanks,
TTauruSS

looks like you can go down but not up.
If you have a group of JMenu's then just go through each one, and use
    MenuElement []comps;
    if(menu.isMenuComponent(myMenuItem)) {
// its in here...
comps = menu[i].getSubElements();
combination of the above should let you find what your looking for. Note that searching through a menu lends itself to some recursive coding.
James.

Similar Messages

  • JMenu.add(JMenuItem)

    Can I just say to start with. I pressed the browser back button from the preview page and it lost my whole post. How annoying is that?
    Anyway.
    Does anyone have any idea why the JMenu.add(JmenuItem) method might not work? It does not throw any exceptions, the menu item is simply not added. I basically have 5 lines of very similar code, the first 2 items are added fine, but the last 3 are not. I have stepped through the code and the last 3 menu itmes look fine, they just dont appear in the menu. I am totally stuck. Please help

    Hello,
    if you have code like this.JMenu menu=new JMenu("Menu");
    JMenuItem item=new JMenuItem("item");
    menu.add(item);
    menu.add(item);only the last item will be visible in the menu and the first will be removed.
    Swing is looking if the component you want to add to a container equals any item in the component hyrarchy .
    Regards,
    Tim

  • Can only access emails through OWA after migration from exchange 2007 to 2013

    can only access emails through OWA after migration from exchange 2007 to 2013, in other words unable to access mails through outlook or from other Applications services.
    needed RCA ... plz help..

    Hi,
    From your description, you can send and receive messages only when you use OWA after migration from Exchange 2007 to Exchange 2013. If I have misunderstood your concern, please let me know.
    In your case, I recommend you create a new test mailbox in your Exchange 2013 and check if you can send and receive messages on Outlook. If yes, it is recommended to create a new profile to solve this issue.
    Hope this can be helpful to you.
    Best regards,
    Amy Wang
    TechNet Community Support

  • I have had a reinstall nightmare getting my loops back they are in the apple library, I can access them through the media browser but I only have a few available through the loop browser, how do I get them all back there again? please help

    I have had a reinstall nightmare getting my loops back they are in the apple library, I can access them through the media browser but I only have a few available through the loop browser, how do I get them all back there again? please help

    "Where do I find my hundreds of dollars of downloads I have done since 2005?"
    They will only be where you put them  If you are doing the very basics, then they will be on your computer and they will be in your backup copy of your computer.
    The itunes store is not global at all, never has been. You cannot redownload your content from another country.  You can only use the countrys itunes store for the country that you are physically located.

  • Since updating my iPhone 4 to ios6 I can no longer access itunes through the itunes app.  I just get a blank white screen.  Is there a fix for this yet?

    Since upgrading my iPhone 4 to the new ios6 software I can no longer access itunes through the itunes app.  I there a fix for this yet?

    Scalesy05 wrote:
    I there a fix for this yet?
    Why would there be a fix?  YOU are having the problem.  I'm not, no one I know is having the problem.  No fix is needed.
    Basic troubleshooting steps clearly outlined in the User Guide are restart, reset, restore from backup, restore as new.  Have you been through any, if not all of these troubleshooting steps yet?

  • Unable to access Database through DBAdapater

    Hi All,
    I am using Dbadapter in my SOA Composite application and trying to access that through invoke activity.
    I am getting errors in both Jdeveloper and in SOA infra environment (http://localhost:8001/soa-infra).I am unable to proceed with my work.
    1) Error in Jdeveloper:
    When I click on Dbadapter and it is giving below error stacktrace:
    java.lang.NullPointerException
         at oracle.tip.adapter.db.ox.AttributeHolder.toString(AttributeHolder.java:82)
         at java.lang.String.valueOf(String.java:2826)
         at
    org.eclipse.persistence.exceptions.DescriptorException.illegalArgumentWhileSettingValueThruMethodAcc
    essor(DescriptorException.java:691)
         at
    org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(Metho
    dAttributeAccessor.java:248)
         at
    org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor.setAttributeValueInObject(Metho
    dAttributeAccessor.java:201)
         at
    org.eclipse.persistence.oxm.mappings.XMLDirectMapping.setAttributeValueInObject(XMLDirectMapping.jav
    a:386)
         at
    org.eclipse.persistence.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1284)
         at
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.j
    ava:342)
         at
    org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildAttributesIntoObject(XMLObjectBuilder.jav
    a:376)
         at
    org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:286)
         at
    org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.buildCompositeObject(XMLCompositeObje
    ctMapping.java:435)
         at
    org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.valueFromRow(XMLCompositeObjectMappin
    g.java:540)
         at
    org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.readFromRowIntoObject(XMLCompositeObj
    ectMapping.java:464)
         at
    org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.j
    ava:342)
         at
    org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildAttributesIntoObject(XMLObjectBuilder.jav
    a:376)
         at
    org.eclipse.persistence.internal.oxm.XMLObjectBuilder.buildObject(XMLObjectBuilder.java:286)
         at
    org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:427)
         at
    org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.xmlToObject(DOMUnmarshaller.java:354)
         at
    org.eclipse.persistence.internal.oxm.record.DOMUnmarshaller.unmarshal(DOMUnmarshaller.java:208)
         at org.eclipse.persistence.oxm.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:476)
         at
    org.eclipse.persistence.sessions.factories.XMLProjectReader.readObjectPersistenceRuntimeFormat(XMLPr
    ojectReader.java:287)
         at
    org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:180)
         at
    org.eclipse.persistence.sessions.factories.XMLProjectReader.read(XMLProjectReader.java:236)
         at
    oracle.tip.tools.ide.adapters.designtime.adapter.xr.XRAdapterUtil.readTopLinkProjectFiles(XRAdapterU
    til.java:492)
         at
    oracle.tip.tools.ide.adapters.designtime.adapter.xr.XRAdapterSelectTablesPage.<init>(XRAdapterSelect
    TablesPage.java:122)
         at
    oracle.tip.tools.ide.adapters.designtime.adapter.xr.XRAdapterOperationPage$ReAddPagesRunnable.run(XR
    AdapterOperationPage.java:844)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
         at java.awt.Dialog$1.run(Dialog.java:1046)
         at java.awt.Dialog$3.run(Dialog.java:1098)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1096)
         at java.awt.Component.show(Component.java:1563)
         at java.awt.Component.setVisible(Component.java:1515)
         at java.awt.Window.setVisible(Window.java:842)
         at java.awt.Dialog.setVisible(Dialog.java:986)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(WizardDialog.java:382)
         at oracle.bali.ewt.wizard.WizardDialog.runDialog(WizardDialog.java:298)
         at
    oracle.tip.tools.ide.adapters.designtime.adapter.techAdapterWizard.display(techAdapterWizard.java:36
    2) Error with testing in soa-infra environment :
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault><faultcode>env:Server</faultcode><faultstring>Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'insert' failed due to: Could not create/access the TopLink Session.
    This session is used to connect to the datastore.
    Caused by java.lang.NullPointerException.
    You may need to configure the connection settings in the deployment descriptor (i.e. DbAdapter.rar#META-INF/weblogic-ra.xml) and restart the server. This exception is considered not retriable, likely due to a modelling mistake.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
    </faultstring><faultactor/><detail><exception>null</exception></detail></env:Fault></env:Body></env:Envelope>
    I am giving proper values for JNDI name in weblogic-ra.xml.
    What I observed is We have a connectionfacatory configuration in ra.xml which is "oracle.tip.adapter.db.ManagaedConnectionfactory".
    Is there any link with this connectionfactory to the errors that I am getting.
    Please guide me on this.
    Thanks in advance

    Have you updated the "Outbound Connection Pools-" under your soa server ?
    http://docs.oracle.com/cd/E23943_01/web.1111/e13732/connect.htm
    *7) Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question.*
    Thanks,
    Vijay

  • Unable to access Workspace through Apache web server

    Hi,
    I have configured Hyperion 9.3.1. products in windows.
    I am getting the following error message when trying to access Workspace through Apache web server(port 19000). But, able to access through Weblogic Application server(port 45000).
    please assist me in resolving this issue.
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Apache/2.0.63 (Win32) mod_jk/1.2.8 Server at nasbydapp04 Port 19000
    Thanks,
    Siva

    I re-configured the BIPlus components and even now, i am unable to access workspace through Apache web server.
    But now, i am getting a different error
    Error:
    HTTP 404 - File not found
    Internet Explorer
    Can anyone help me in resolving this issue.
    I have updated httpd.conf and HYSL-Weblogic.conf file in Apache server.

  • Error while accessing data from MS Access DB through Window AD architec

    Dear Members,
    Iam having a BO 3.0 installation on a standalone PC with the basic tomcat and mysql setup... As a test environment, Now while designing universes i can easily connect to Oracle EBS structure also SQL server DB ... the problem is when iam linking to a MS Access DB through a network drive (its all ok in the designer) but while in Webi while runnning the query, it throws an error of (WIS 10901 .... database error DSN not specified)
    I have configured ODBC properly also given appropriate rights for the users and strangely the same universe is running well with my thick client desktop and webi rich client
    (so iam sure its not a odbc issue)
    Looking forward for any comments on this problem

    possibly the account running the webi report server doesn't have access to the drive. Is it local system? Try using the same account you are logged into the webi rich client as, but you will most likely need to grant that account local admin on the server so it can run the service.
    Regards,
    Tim

  • How to find users machine / IP who is accessing forms through Oracle AS

    Dear Gurus
    We need to know the users machine / IP who are accessing forms through Oracle 9i Application Server, how can we find that?
    thanks in advance
    regards
    Mehmood

    Mehmood,
    Set serverURL=/forms90/f90servlet/session in the Forms Web configuration default section or add it to the URL to start tracing host name and ip-addresses from clients. The output appears in the servlet log file application.log. sessionperf , perf and debug are the other options instead of session.
    regards,
    Bernhard Jongejan
    http://bernhardjongejan.spaces.live.com

  • HT1212 my iphone screen is broken and i need to access it through itunes but my phone is locked. it cannot be unlocked on the screen but is there any way i can do it on itunes?

    my iphone screen is broken and i need to access it through itunes but my phone is locked. it cannot be unlocked on the screen but is there any way i can do it on itunes so i can access it?

    Depends, if you've synced with this iTunes, while that passcode was enabled, you won't be prompted to enter the passcode when connecting your phone. If you have not synced, while that passcode was enabled, you will. So, if you fall in the later, there is no way to do what you want.

  • The screen on my iPhone is frozen and I can access apps through Siri. The touch screen works within the apps but not in the home screen. What do I do?

    the screen on my iPhone is frozen and I can access apps through Siri. The touch screen works within the apps but not in the home screen. What do I do?

    Have you tried a reset which is similar to a computer restart and is done by pressing and holding the home button and the sleep/wake or on/off button simultaneously until you see the Apple logo and then release?

  • My iphoto9 has not been able to open for over 10 days!!  I can't load my Christmas pics, etc.  I know the pics are still there because I can access them through a round about way.  Can anyone help me to OPEN iPHOTO!?

    My iphoto9 has not been able to open for over 10 days!!  I can't load my Christmas pics, etc.  I know the pics are still there because I can access them through a round about way.  Can anyone help me to OPEN iPHOTO!?

    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    If you purchased it on the App Store or have a Recent Mac you can find it in your Purchases List.

  • Enable to select a check box in ALV while accessing it through portal

    Hi All,
    Currently I have given a link on portal to run a transaction code. The output of the program is ALV report, where user any select the check boxes.
    Now when I try to select a check box, it is not getting selected. I click on the checkbox, the tick appear and then the screen refreshes itself and the tick goes off. This is happening only when accessing it through portal. If i run the program in R/3 directly, I am able to select the check box.
    Please advice on this.
    Thanks
    Namit

    Reported to SAP for the same.

  • I installed plugins Vertus Fluid Mask and Imagenomic Portraiture but I do not see it under the filters tab like I do in CS3.  How do I access it through Photoshop CC.

    I installed plugins Vertus Fluid Mask and Imagenomic Portraiture but I do not see it under the filters tab like I do in CS3.  How do I access it through Photoshop CC?

    Good day!
    Have you installed the Photoshop-version-appropriate versions of the plug-ins?
    Regards,
    Pfaffenbichler

  • Why can't I access Scrabble through Facebook on my IPOD Touch?

    Why can't I access Scrabble through Facebook on my IPOD Touch?

    See the other actions of:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

Maybe you are looking for

  • Portal Runtime Error for WPC user

    Hi experts, I assign wpc_editor_role for my user. But he is getting Portal Runtime error everytime he try to create link list/teaser/paragraph, publish webpage, finish webpage. The error is as follows: Portal runtime error. An exception occurred whil

  • Adobe Photoshop CS3 Registration screen blank and unresponsive,

    I just installed Adobe Photoshop CS3 Extended Version, and was eager to use it when I got the registration screen...and it froze. It just blanks out after selecting "Do Not Register" and "Register Later" I don't know how to fix it...can you guys help

  • Blank Screens in Slideshow - Fixed!

    As others have mentioned in previous threads, I was having intermittent problems with blank screens appearing in Lightroom 1.0 slideshows. Sometimes every slide, other times alternate slides. It appears my problem was caused by Microsoft's Intellipoi

  • Change Diagram Type in Control Chart in QE51N

    Hi I'm using the QE51N to record the results. I press the Control Chart Button and it's OK. I change the Diagram Type from "Lines" to "XY" (Dispersion), but the change isn't keep it for the other characteristics, or if another day I execute the QE51N

  • DIR not visible from attached sap object and validation check problem

    Hi Experts, I have created new sap object link for table BUT000 and transaction code is BP. Now 1) when I am creating DIR through CV01N, I am able to view Object link column with one filed called PARTNER. If I enter wrong or Invalid partner here, sys