Adding a JMenu to another JMenu

Hi All,
I have a File JMenu added to the JMenuBar. To this menu I have added another JMenu called Open File. The Open File Menu in turn has two JMenuItems - Open DTD file and Open XML File.
When I first start the application, the submenus work fine. However, after I have used any of the other menu items in the File Menu like, Create File / Save, the submenus stop working. The File JMenu simply gets rolled up when I try to choose Open File Menu again.
Is this a known issue as far as adding a JMenu to another JMenu is concerned? What could be the reason behind this? Any solution to this problem?
Thanks in advance,
Arati

Hi
The code is quite simple and is as follows:
JMenu fileMenu = new JMenu();
JMenu openMenu = new JMenu();
JMenuItem openDTD = new JMenuItem("Open DTD");
JMenuItem openXML = new JMenuItem("Open XML");
openMenu.add(openDTD);
openMenu.add(openXML);
// I have also added action listeners for the menu items
fileMenu.add(openMenu);
There are other menu items in the file menu too. When I first select the menu Open File, everything works fine, the two sub menu items are shown and I can select one of the two. However, when I click on any other menu item (like create file) and then try to use Open sub menu again, the menu simply rolls up.
The application that I have has a small frame of its own for the menu bars and the tool bars. The File menu being a little long, it goes out of the boundary of my frame when rolled down. Interestingly, java considers the menu as a separate window in this case. Could this be a problem in any way? I had faced some problem because of this behaviour of Java and had spent quite some time to fix it.
Regards,
Arati

Similar Messages

  • File not found when adding a link to another site collection on the navigation page

    When I am adding a link to another site collection in the navigation page, I got the following error. Is there any limitation for the navigation setting? why can't we add a link to another site collection in the navigation page?
    This is SharePoint 2007

    Hi
    the URL provided is working?  (check it in separate browser window )
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • HT1202 How do I added my music to another computer thats not my home computer???

    How do I added my music to another computer thats not my home computer???

    Are you wanting to add music to an iTunes library on another computer?  That shouldn't be a problem.  Just import it or rip the same way you would on your iTunes library on your home PC.
    Or are you wanting to extract content from the iPod into this new/different iTunes library?  If so, see this excellent user tip from another forum member turingtest2 on different ways to extact the media on your iPod and back into iTunes.
    https://discussions.apple.com/docs/DOC-3991
    B-rock

  • Want to be added as line to another plan, told by VZ store voids warranty

    I have been eligible for an upgrade for a while now and am about ready to do it.  My fiancee has a VZ plan for her and her family and wants to add me.  The prices on phones in the store is alot higher than what I can get it for online and they won't pricematch.  My upgrade is supposed to give me a discount on the phone, a $50 credit from VZ, and sometimes an online discount.  I assumed I could just do my upgrade then at a later date transfer onto my Fiancee's plan as an additional line. 
    When I told the people in the store that I was just going to do my upgrade online so I could get my credits and discounts I was told that if I did that, when I transfer to my fiancee's account my phone's warranty would be void and I wouldn't be able to get the insurance.  This sounded like complete **bleep** so I went to another store and was told the same thing.
    I've been with VZ for a LONG time and many phones, and this just seems like a scam in which no matter what I do, I lose.  If I buy in the store I get to keep a waranty and get insurance, but I pay alot more for the phone and don't get any discounts or credits.  If I buy online and transfer onto her account, I run the chance of having my new phone develop a problem and leave me stuck paying full price for a replacement. 
    Its all VZ, and it would all be new, so why can't I be added as a line without losing my warranty?  Why couldn't I get my upgrade and be added to her plan at the same time?  Is there a way for me to do this without having to go to the store and have to fight because they're losing commission?  I've always bragged about VZ when my friends were complaining about other providers, but this experience is leaving me with a feeling that VZ is just about maximizing profits.

    MarkMyers34429 wrote:
    I have been eligible for an upgrade for a while now and am about ready to do it.  My fiancee has a VZ plan for her and her family and wants to add me.  The prices on phones in the store is alot higher than what I can get it for online and they won't pricematch.  My upgrade is supposed to give me a discount on the phone, a $50 credit from VZ, and sometimes an online discount.  I assumed I could just do my upgrade then at a later date transfer onto my Fiancee's plan as an additional line. 
    When I told the people in the store that I was just going to do my upgrade online so I could get my credits and discounts I was told that if I did that, when I transfer to my fiancee's account my phone's warranty would be void and I wouldn't be able to get the insurance.  This sounded like complete **bleep** so I went to another store and was told the same thing.
    I've been with VZ for a LONG time and many phones, and this just seems like a scam in which no matter what I do, I lose.  If I buy in the store I get to keep a waranty and get insurance, but I pay alot more for the phone and don't get any discounts or credits.  If I buy online and transfer onto her account, I run the chance of having my new phone develop a problem and leave me stuck paying full price for a replacement. 
    Its all VZ, and it would all be new, so why can't I be added as a line without losing my warranty?  Why couldn't I get my upgrade and be added to her plan at the same time?  Is there a way for me to do this without having to go to the store and have to fight because they're losing commission?  I've always bragged about VZ when my friends were complaining about other providers, but this experience is leaving me with a feeling that VZ is just about maximizing profits.
    I don't know how true what you've been told is. There should be no difference whether you purchse in-store or online. What you would need to do to be put on your fiancee's plan is called an Assumption of Liability. When you do this, your contract status and upgrade date remain the same. It is true that when you do an AOL, you void the warranty (it's all over the forums here that this is what happens) SO. To go around this, do the AOL first and get put on your fiancee's plan. Since your upgrade eligibility and contract remain the same, do your upgrade after, and you will keep your warranty. This might, however, forfeit your $50 NE2 credit. I'm not exactly sure. But I guess you just have to choose which one is more important: The $50 off, or to be able to have that 1 year manufacturer's warranty to fall back on.

  • New FaceTime account won't allow old email to be added "already exists on another account"

    Since I was having difficulty getting Facetime to work, I set up a whole new Apple ID account. I used a gmail address, because the system kept telling me my regular email was already connected to a different account (which the "fill in the blank" Apple search could not seem to locate). Any idea how I can get my regular email removed from the old account so I can use it again?
    I'm not sure if this problem is really clear, so I'll try to explain it another way. A friend has me set up to connect via Facetime using my present email which is through cableone. However, evidently when I set up my original Apple ID, I used an email that no longer exists. So I tried to locate all that account information, and when I was unsuccessful, I went ahead and created a whole new Apple ID. I had to use my gmail account address because my cableone address is somehow connected to the older Apple ID. I'm wondering if there is a way to "disconnect" my cableone address from the older ID so I can use it again.

    Same thing here. I am getting the authorization message with iPad, 2 iPods and 3 iPhones. I'm furious about this. I reviewed my itunes account info and everything looks accurate. I downloaded a movie this morning and I can't sync it to iPad. Let's see what explanation is offered. 

  • Adding a KF from another Cube

    Hi Gurus,
           I have requirement to add 2 Key Figures from one query of InfoProvider A to another query of a different InfoProvider B. Please guide me in designing the query.
    Thanks,
    S

    Hi Sid,
    In this case you can consider using jump target queries. You need the 2 queries set up on the cubes as reqd. Then in RSBBS assign them as sender and receiver. Then when you execute the sender query, you can right click and jump to the receiver query. When you do so char values from report 1 will be transferred to report 2 (for whatever chars are common in both queries).
    Hope this helps...

  • When adding a contact.. another iphone on my plan got that same contact

    I just recieved an iphone and my sister got one as well. We were adding contacts to our phones and noticed we were getting the same contacts we were adding. (EX: I added a friend and the same friend would pop up in her contacts and she didn't create his contact) Is there a way to fix this without going to the apple store/verizon?
    If anyone doesn't understand i can go into more depth if needed.

    Are both iPhones using the same iCloud account?  iCloud syncs contacts (among other things) so if you're both using the same iCloud account on your phones it would automatically add any contact entered on one phone to the other one as well.  Check under settings->iCloud and see what account name is listed at the top.  If it's the same on both phones that would explain it.
    Good luck!

  • Adding mp3,s from another computer

    Ive a nice library of music on my ipod from one computer, now i want to add music from another computer to that library on my ipod. Somehow my ipod cant do that and erases everything thats on the hd,,, this is terribly frustrating.
    Is there a way to ad mp3's to the ipod library from other computers without erasing the current content?

    http://docs.info.apple.com/article.html?artnum=61675

  • Adding a jPanel to another jPanel help

    I have a class NavigationButtonsClass which has the navigationalPanel which in turn has buttons back, next ... etc.
    public JPanel navigationalPanel = new JPanel();
    I have another class ProjectClass in which I gave the following
    NavigationButtonsClass newNavigationButtonsClass = new NavigationButtonsClass();
    jPanel1.add(newNavigationButtonsClass.navigationalPanel, new XYConstraints(0, 0, 795, -1));
    this.getContentPane().add(jPanel1, new XYConstraints(1, 420, 798, 45));
    Is something wrong here. I am not able to see the navigationalPanel.
    Thanks.

    Modify ur NavigationButtonsClass like,
    public class NavigationButtonsClass extends JPanel
       add(backButton);
       add(cancelButton);
    }Now in ur ProjectClass
    this.getContentPane().add(new  NavigationButtonsClass(),BorderLayout.SOUTH);I have assumed ur Project class extends JFrame...

  • Adding AB names from another computer

    I would like to ADD the names from Address Book on one Mac to the existing Address Book on another.
    Do I need to export one address book as text (how?) and then import the text into the other?
    thanks
    Pete

    Hi Peter,
    Select the 'All' group in AddressBook. Next, under the File menu select 'Export Group vCard...' and save the file somewhere.
    Copy this file to your other Mac (email it, copy to a flash drive/CD etc) and simply drag and drop the vCard file into the open AddressBook on the new computer.

  • When adding or deleting contacts on my iphone, contacts get added or deleted on another iphone as well?!

    So I have an iPhone 4S and my mom has an Iphone 4. Recently we discovered that whenever we add or delete contacts from her or my phone, they get added or deleted in both our iPhones. So for example: When I add a friend to my contacts, it gets added to her contact list as well. When I delete one of my contacts, it gets deleted from her contact list as well! I think it has something to do with having synced her iphone once on my laptop using my itunes but her phone doesn't have my apps, photos, or music so I don't get how this is happening. Does anyone know how to stop this?

    You are logged into icloud on the same account.
    Go to settings>icloud  and either "delete account" (which signs you out of that account on that device) or just turn contacts off
    I would recommend one of you create your own account specifically for use with icloud.
    Again you can access your icloud settings by going to settings>icloud

  • Contribute cs5, adding a line under another sentence

    Please see www.valetingcars.com on the right you will see a price list, when i try to insert another line under FULL VALETS it drops down 2 spaces instead of one, this happens all over the page when i try to insert another line.
    Can anyone tell me why, and how to correct this as i only want to add another line underneath.
    Thanks

    Thanks for that it worked, however if you look at my site www.valetingcars.com you will see right at the top an extra bar since i changed the setting in contribute. My host said they will sort that out for me so no problems. Thanks for the help.

  • Adding a link to another page in View Mode using Destination URI

    Hi All,
    I have the Search items page in iProcurement, and the Supplier Name is a text field in the search results region. Now I want to display the Supplier Name as a link, clicking on which the user should be taken to the corresponding Supplier details page in View Mode.
    Is this something that can be done through personalisation, as in without extending the controller etc. I tried by giving the url of the supplier page in the Destination URI of Supplier Name, and it navigates to the supplier page, but how do I implement the functionality of querying the details of the Supplier in context. That is, what is the url that needs to be used, and what are the parameters that need to be passed etc? What is the approach to implement such a functionality. I have done OAF development, but havent done any personalisation.
    Thanks
    Anish

    Hi,
    I have a custom inventory report where I have a header region with the From Date and To Date column. The user enters these two dates and the data is displayed in the Table region between these two dates. Then in the item column I have a URL link which takes us to the Detail page. I need to pass the item number and the From Date and To Date in that link so the where clause can be set for the detail query. The attribute value for the item passes fine but I do not know how to pass the value for the dates. My URL looks like as below. I have tried different ways as mentioned in metalink or google search but no luck. Tried to capture the value also and it shows as the value as ‘$FromDate’.
    OA.jsp?page=/xxbn/oracle/apps/xxbn/consignment/webui/ConsSaleDetailPG&ItemNumber={@ItemNumber}&FromDate=$FromDate&ToDate=$ToDate&retainAM=Y&addBreadCrumb=Y
    I would appreciate if I can get some light on this.
    Thanks in advance.

  • Adding named constraints from another schema using stored procedures

    I need some help. I am trying to create a constraint like Primary key on a table in schema say 'a' from schema 'b'. in Oracle 10g. Schema b has all permissions of create, alter table, create index and other permissions required.
    I can create this constraint from schema b using SQL command 'alter table add constraint...' but not from inside a procedure. I am using 'Execute Immediate' statement to alter table to add constraint. While trying from a procdure, it throws the error as 'insufficeint previleges'.
    Kindly advise.

    it is due to roles.
    if schema b has for example role DBA it is not sufficient. You should
    GRANT ALTER ANY TABLE TO B;maybe also CREATE ANY INDEX. not sure...
    regards
    Laurent

  • Adding external data from another forest?

    Hello Community
        The following 2 scenarios are how data is entered and stored in a non-Sharepoint environment: 
        Scenario a) C# ASP.Net or C# Windows applications are used to enter data that gets stored
    into SQL Server databases on a network.
        Scenario b) Users create Word applications, Excel Spreadsheets, PDF's, etc and the data is
    stored in folders on servers on a network.
        In the future a Sharepoint 2013 Server farm is created in a domain in a separate forest.
        The question(s) is:
            #1) How do you add those servers that contain the data in the pre-existing
                 SQL Server databased to the Sharepoint 2013 farm?
            #2) How do you add those servers that contain the data in the pre-existing
                 Word documents, Excel spreadsheets, PDF's, etc into the Sharepoint 2013 farm?
            #3) If it exists, what 3rd party software stated in either #1 and/or #2 above can
                 add those servers or import that data on those servers into the Sharepoint 2013 farm?
        Note: If BCS can be used does each client need to have Microsoft Office 2013 installed
              on each client computer?
        Thank you
        Shabeaut

    SharePoint won't be able to manage documents in those custom/3rd party databases. If this is a 3rd party database, there may be a solution to migrate the information into SharePoint. If it is custom/in-house, then you'll need to build migration utilities
    yourself.
    Ideally, those documents should reside within Document Libraries in SharePoint to have full management over those documents.
    As for BCS, it is meant more for display List-style data, not documents. But clients do not have to have any components installed to leverage BCS, as BCS is a service on SharePoint.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for