How can I have acces to a component of a window from a menu

In a JInternalFrame, I have one Button.
I try to access to this Button from a ActionListener of a JMenuBar.
In the ActionListener of the JMenuBar, I have use the function "MyActiveFrame = MyDesktop.getSelectedFrame();" for having a pointer to my JInternalFrame.
But I don't arrive to access to a component of my JInternalFrame.
I have try "Button Boutton1 = MyDesktop.Boutton1;" but that don't work. It always say :
     java:56: cannot resolve symbol
     symbol : variable Boutton1
     location: class javax.swing.JDesktopPane
                    Button Boutton1 = MyDesktop.Boutton1;
^
Is someone can tell my how I can have acces of this Button (and to the others component of my JInternalFrame from my JMenuBar).
dank you in advance.

No, that's not the problem. The problem is:
    JInternalFrame MyActiveFrame;
    MyActiveFrame = MyDesktop.getSelectedFrame();
    Button Boutton1 = MyActiveFrame.Boutton1;You are declaring MyActiveFrame as a JInternalFrame, not as the class you defined that extends JInternalFrame. Since JInternalFrame has no member named Boutton1, then MyActiveFrame.Boutton1 will cause the error.
For example:
    public class MyFrame extends JInternalFrame {
        public Button Boutton1 = ...;
    };If you did something like:
    JInternalFrame frame = getOneOfMyFrames();
    Button b = frame.Boutton1;You would get an error. You need to do:
    MyFrame frame = getOneOfMyFrames();
    Button b = frame.Boutton1;Know what I mean?
Jason

Similar Messages

  • HT1766 How can I have multiple iphones on itunes and prevent them from having the info from one ipone going to the other

    How can I have multiple iphones on itunes without them sharing contact info

    If contacts on each iPhone are being synced direct with the same supported address book app on the computer via the iTunes sync process, deselect Sync Contacts under the Info tab for the iPhones that you don't want synced with the same address book followed by a sync.
    If each iPhone is sharing the same Apple iCloud account with Contacts enabled for over the air syncing, each iPhone needs its own iCloud account.

  • How can I have acces to each NodeStamp in af:tree?

    Hi,
    I have an af:tree with an af:outputText nodeStamp type. I need to display one of these outputTexts with Red color and others with Blue color, depends on the value of each row. My only doubt is how I can acces to each nodeStamp value to modify its inlinestyle. I try it with something like:
                /*Supposing that I want to change the color of only second row*/
                //ttNd is the RichTreeTable Object
                this.ttNd.setRowIndex(1);
                //This is the object which value is used to display the nodestamp value dynamically
                Object myObj = this.ttNd.getRowData();
                RichOutputText res = (RichOutputText)this.ttNd.getNodeStamp().getChildren().get(0);
                res.setInlineStyle("color:Red;");But it not works, it just change the color of all nodes.
    How can I do this? I'm using ADF Faces RC with just Backing Beans.
    Environtment: JDeveloper TP4 | JDK 1.5
    Thanks in advance,
    JVN

    If your value criteria is something simple you may use an EL for the color property of the node as below..
    #{node > "105" ? "red" : "blue" }{code}                                                                                                                                                                                                                                                                                                                                   

  • How can I have an instance of mx.controls.List in a SWF from Flash?

    How can I have an instance of mx.controls.List component in a Flash, and import its SWF into a Flex application so it can controll it?  Is it possible to do this either at author-time or runtime?
    I see plenty of examples of how you can import a SWC into Flex, but how can I have my Flash interface, with Flex components already in place to be consumed by Flex?
    Thanks

    Hallo, here is more code for my problem:
    class Login {
       Devisen dev=new Devisen();
    class Devisen {
       JTextField field2;
       if (!Check.check_field2()) return; // if value not okay than return
    class Check {
       public static void check_field2()
         HOW TO GET THE CONTENT OF field2 HERE ?
    One solution ist to give the instance to the static function, with the keyword "this"
    if (!Check.check_field2(this)) return;and get the instance
    public static void check_field2(Devisen dev)BUT is that a problem for memory to give every method an instance of the class ? I have 50 fields to control and I dont want do give every check_method an instance of Devisen, if this is a problem for performance.
    Or do I only give the place where the existing instance is.
    Hmm...?
    Thank you Wolfgang

  • How can I have multiple users on iTunes (in order to connect to a shared office iPad)?

    How can I have multiple users on iTunes (in order to connect to a shared office iPad)? Currently each of us has our own iTunes account, so I've made an "all office" Apple ID. However, I can't seem to get two different accounts (my personal and the office) to work on my machine. Even when I login as "the office", my personal library is still showing. Additionally, when I try to setup with a first-time use in iTunes, I get an error that I don't meet the minimum age requirement - no matter what birthdate I enter!

    The library exists regardless of which user is logged in.
    The only way around that is to create different user accounts on the computer.
    There is no way to have 20 unique iTunes users access a shared iTunes under a single login on the computer.

  • I have OSX Maverick on an iMac using Outlook e-mail.  PDF attachments are included in the e-mail  as the whole document rather than just the PDF icon.  How can i have just the PDF icon as an attachment?

    In Outlook my PDF attachments appear as whole documents and not just the PDF icon.  How can I have attachments included as PDF icons and not the documents?

    For your own viewing, you can of course control-click on the attachment and select "View as Icon".
    For others' viewing, it depends upon their email reader.  To ensure that attachments are not displayed expicitly you can put them all in a zip file (via control click and "Compress") then attaching them, or you can use third party stuff like Attachment Tamer.
    charlie

  • On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom new document in order to open one. How can i have directly a new document when i click on pages icon

    On my mac when i click on pages, a new document doesn't open instantly  but a window with my files open and then  have to click on the left bottom < new document> in order to open one. How can i have directly a new document when i click on pages icon

    How to open an existing Pages document?
    Click Pages icon in the Dock to launch Pages.
    When Pages is open, click File menu in the  Pages menu bar.
    Select “Open”.
    When the select document  dialog box opens up, highlight/select the document and click “Open”
    at the bottom right corner of the dialog box.
    s
    https://support.apple.com/kb/PH15304?locale=en_US

  • How can I have two itunes accounts on one computer?

    How can I have two itunes accounts on one computer?

    Not sure what you mean.
    An account is a user name and password.
    Sign into whichever account you want to use for purchasing.
    Authorize the computer for both account to listen to the content.

  • How can I have two different windows up on one screen at the same time?

    How can I have to different windows open on my screen at one time? Kind of like a split or shared screen.

    If you want this split screen thingy for a single app, do like captfred suggests or see if the app itself supports some sort of splitting, like MS Excel.
    If you want to do this system-wide, maybe you can get what you want by activating and using Spaces: http://support.apple.com/kb/PH4313

  • How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    How can I make the background one solid color?  It is too difficult and noticeable when I use the retouch button and try to erase all the creases in my backdrop.  So, how can I have just a solid white background?

    When talking about a specific image posting the image may be useful.
    One can use a Layer Mask and add a white Layer underneath.

  • How can we have two different Itunes libraries on one computer?

    How can we have two Itunes accounts on one computer?  I found info on the itunes help page but I do not know how to follow the steps given because I am not prompted with what it says I should be prompted with? Please help I don't want to delete one of our libraries

    Launch iTunes with the Shift key held down as needed, or use different Windows XP user accounts.
    (74282)

  • How can I have multiple users on one apple id?

    How can I have multiple users on one apple ID?
    ie: I have my apple ID with my own credit, how can I set up credit for my son under the same apple ID, so that he can still access the same apps I've already downloaded and paid for?

    I've been trying to figure out a clean way to do this too. I think you may need more than one Apple ID – one that is shared and used to purchase "sharable" items and then "individual" Apple IDs for you and your son. That's the idea that I'm pursuing for the moment.
    It seems that there must be a way to do this, App Store purchases for the Mac are licensed across multiple machines. iPhone app purchases have "all your devices" licensing. Makes me think that Apple has a process in mind for sharing an account (or associating a device with multiple accounts).
    Other things I've learned:
    - Apparently you can't merge Apple ID accounts. I asked about this once at an Apple Store and was told that there was no way to do it.
    - If you share an Apple ID the Messages app behaves in a somewhat surprising manner. It must use your Apple ID to decide where messages should be sent because all users get all messages. This can make it very hard to organize a surprise party :-)

  • How can I have one "family" Apple ID and two icloud accounts one for me and one for the wife?

    MacVirgin!Just got new Air and iMac (iphones on the way). How can I have one Apple ID but two iCloud accounts (one for me and one for my wife)? I have set up one iCloud account and am attempting to share contacts between iMac, iCloud and Air, however iMac and iCloud are not in sync? I must be missing something very simple.

    ok. I set up the imac and Air with one user account. this was used to activae iCloud on both machines and I have now se up one iCloud account and managed to share calander and contacts between the two. Ultimately both me and my wife will have an iphone and we wish to share calenders and contacts. We both also use the imac and air on one user account. It looks like I need to set another user account then activate iCloud in my wifes Apple ID

  • How can I have 2 devices on one iTunes?

    How can i have 2 devices on one iTunes so that they share the same music but have different apps? Is there a way to do that?

    Each can sync with the same playlists, or different ones, and can have different apps...
    Uncheck the Automatically sync new apps box on the Apps tab after connecting each device and before syncing. Once this box has been unchecked each device should remember the setting and only sync the apps that have already been selected for it, plus any you then decide to manually add to the list or purchase on each respective device.
    tt2

  • Can 2 different users with 2 different Iphones use the same itunes to backup each phone separately? if not how can I have a backup for 2 different iphones on the same laptop?

    can 2 different users with 2 different Iphones use the same itune program to backup each phone separately? if not how can I have a backup for 2 different iphones on the same laptop?

    Here is your answer:
    http://support.apple.com/kb/HT1495

Maybe you are looking for

  • I have latest firefox in windows 7 64 bit I can not open .eml extensions. what is wrong

    I get e mail with .eml extensions. I can not open them yet my wifes same firefox can open them. what is up

  • Lenovo G580 20157 but no HDMI port?

    Hello, My brother has recently purchased a Lenovo G580 laptop from New World in Menlyn, Pretoria, South Africa (http://www.newworldmenlyn.co.za) According to the advertised specs (http://shop.lenovo.com/us/en/laptops/essential/g-series/g580/index.htm

  • Oc4j 10.1.2.0.2 and Fedora

    We have Oracle 10g AS 10.1.2.0.2 deployed at an enterprise level. I am working on a JSF application that will be deployed to this server. As I work on this application I would like to deploy it in stages to a local copy of oc4j 10.1.2.0.2 on my works

  • MuVo² Startup Iss

    Yeah, hi people. I've had this awesome Creative MuVo? 5gigs for a bit, and I was superhappy with it. Untill one day it suddenly stopped, died, whilst I was listening to music... Once home, I charged it back up, thinking it was that. Well, as I wanted

  • List of Employees Attached to Organization Unit

    Hi Experts, If I know the organization unit , can I find the number of employee numbers mapped to or belongs to  that organization unit. Thanks in Advance. Regards, IFF