How can I from one panel access elements on another panel ?

I have a JFrame with 2 panels and a JMenu
I am struggling to find a way how I can access JMenu from one of my panels ...
Also how can I access elements on one panel from other panel ? At the moment I am passing a reference from one panel to other in the constructor but it's only one way communication now ... I can't go from second panel to first ...
I am sure there must be an elegant way to solve this problem.
Many thanks.
Sergei

OK I'll give you more details...
I have a JFrame with multiple panels...
Also I have a JMenu on JFrame...
Now when user clicks a button on one of the panels I need to disable a menu item ... this is issue#1
issue#2 is:
how do I get two panels (they are separate classes) talking to each other ??? At the moment when I initialize a panel#2 from my Frame I pass to it reference to panel#1 and in this way panel#2 can talk to panel#1 but panel#1 can't talk to panel#2 ...
I know there must be an elegant way to solve this problem... and I don't like having 2 classes tightly coupled like this... Can I use some kind of nice OO trick for this ? I was reading about custom listeners but I don't want to go crazy on this as I don't have time... actualy I've got only 1 day to solve this issue so any help will be greatly appreciated.
Many thanks
Sergei

Similar Messages

  • How to remove admin permissions AD DS when admin from one forests access resources in another forest?

    Hello Community
        A  forestA and 
    a forestB exists on the network.
        In forestA, active directory has an administrator.
        In forestB, activre directory also has an administrator.
        There is a trust reletionship between the 2 forests.
        When the administrator for forestA  accesses resources
    in forestB,  how can I make sure that the administrator in
    forestA does not have administrative permissions in foresB?
        Thank you
        Shabeaut

    They do not have access by default unless if you delegate that to them. For high secure environments, you might consider implementing a Selective Authentication: http://technet.microsoft.com/en-us/library/cc755844(v=ws.10).aspx
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.
    Get Active Directory User Last Logon
    Create an Active Directory test domain similar to the production one
    Management of test accounts in an Active Directory production domain - Part I
    Management of test accounts in an Active Directory production domain - Part II
    Management of test accounts in an Active Directory production domain - Part III
    Reset Active Directory user password

  • HT3354 how can i use one table for reference to another

    how can i use a table for a referance to another eg when i type a word in a cell, i will like it to match the word with another table then return the information in the cell i am using

    you can use vlookup() (or any of the lookup family of functions) to locate an item based on a key value:
    Here is an example of something you can do with two tables:
    The table on the right is title "Data" and stores a list of names with age and favorite color.
    The table on the left uses the value in the first column to lookup up information in the table Data
    in the table on the left:
    B2=IFERROR(A2&" is " & VLOOKUP(A2, Data :: A:D, 2, 0)&" years old and likes the color "& VLOOKUP(A2, Data :: A:D, 3, 0), "NOT FOUND")
    I know this look complicated.  so I'll break it up into smalled pieces:
    first the "&" is called the concatenate operator and joins two strings.  like this:
    a string is a set of characters between double quotes.
    so "string 1" & "string 2" becomes "string 1string2"  or "Sam " & "Jones" becomes "Sam Jones"
    you can use cell references instead of strings directly in which case the concatenation is performed on the contents of the cells.
    so if cell A1 contains "Hi " and the cell A2 contains "There"  then A1 & A2 will result in "Hi There"
    so you could add the formula
    A3=A1 & A2
    this is short hand for select cell A3 then type everything including the A3 so that A3 contains "=A1 & A2" (omit the double quote)
    OK.  So the formula I provided concatenates several items together:
    it concatenates A2, then the string " is " then a formula, then the string " years old and likes the color " then a formula
    the two formulas (highlighted in blue) perform a lookup of the value in cell A2 in columns A thru D of the table named "Data".  If if finds the value in cell A2 in the first column of the lookup range in the table Data (column A) then it returns the value from the same row but in the second or third column.
    all that is in a function calld iserror() to trap the condition where the calue you enter in A2 does not exist in the table Data:
    You will find the Numbers users guide and function reference helpful.  You can download then from Apple here:
    http://support.apple.com/manuals/#productivitysoftware

  • How can I put one "shape" on top of another in pages?

    Hi all:
    I'm trying to do something pretty simple.  I made some shapes using the "shapes" tool in the toolbar.  I want to put one shape on top of (or in front of) another but it gives me the masking tool instead.  I tried putting a shap in the background but that didn't work either.  it tends to snap the shape I move to it right back to where it was when I tried to move it.  How can I do this?
    Thanks!

    I really don't understand what you are doing.
    I inserted two shapes with their default settings and I got what you see.
    I unchecked the box "Object causes wrap" but it's usefull when there are text objects in the page.
    Yvan KOENIG (VALLAURIS, France) samedi 7 avril 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.3
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k

  • How can I use one Add-on prior to another for specific MIME-types?

    I'm using Shockwave Flash plugin to watch some videos on YouTube, StreamCloud, etc. It also handles .mkv and .mp4 files/streams. After installing VLC Web plugin to handle MIME-types like mp3/4, mkv additionally and prior to the Flash plugin, Firefox keeps using Flash to handle those types insted. I cannot find options to set the desired priorities. Only disabling the Flash plugin solves my problem, but also keeps me from watching Flash contents, which Is not acceptable.
    Did I miss something or is this Firefox's fault?

    If you type or paste '''about:plugins''' in the address bar and press Enter, you can see which plugins are associated which various content types.
    I do not know how to prioritize one over the other for the same content type if the plugin settings (plugins often have an interface outside of Firefox to adjust their settings) do not allow that.
    As for MP4, I don't think Flash normally would be selected. I suspect the website is specifying a Flash media player and streaming the MP4 through that. If you want to hide the Flash plugin from a particular website, you can use the Permissions tab of the Page Info dialog.
    Click the padlock or globe icon in the address bar, then More Information, then Permissions. The top section of the Permissions panel should be "Activate Plugins". Here you can select Block for Flash for the current site. After reloading the page, does the media play using a different plugin?

  • How to move from one SQL Server table to another

    Suppose I have two tables:
    Employee1:
    EmpName varchar(100)
    EmpAddress varchar(200)
    And
    Employee2:
    EmpID int,
    EmpName varchar(100),
    EmpAddress varchar(200)
    Note: EmpID is not an identity field
    How to move all the data from Employee1 table to Employee2 table with values of EmpID as 1, 2, 3, ....so on.
    Can anyone have any idea?

    INSERT INTO [Employee2] (EmpID, EmpName, EmpAddress)
    SELECT ROW_NUMBER() OVER (ORDER BY EmpName), EmpName, EmpAddress from Employee1
    should work

  • How can I make one entity attribute change trigger another's default value?

    Guys and Gals,
    Using JDev 11.1.2.1.0
    I have an order form which has a LOV (Customers) and an address field. The address field should contain the default address associated with the selected key in the LOV.
    To do this, I have an entity (Order) with two attributes (CustomerID & Address). Address has its default value set to "adf.object.getDefaultAddress" which returns the default address for the CustomerID. This only works on initial load.
    How would I make this adf.object.getDefaultAddress trigger when I select a different LOV CustomerID in the View Object?
    I've tried various things but am a little confused. Is there something akin to partial triggers for entity objects?
    I can provide pictures, code, etc.
    Thanks,
    Will

    you can try this.
    go the the setter method in your EntityImpl class for the LOV attribute
    public void setCustomerID(Number value) {
            setAttributeInternal(CustomerID, value);
            //here call the setAddress() method
        }in your page, set the customerID autosubmit to true and make the Address field PPR the customer Id.
    <af:selectOneChoice value="#{bindings.CustomerID.inputValue}"
                               id="soc1"
                               autoSubmit="true">
            </af:selectOneChoice>
            <af:inputText value="#{bindings.Address.inputValue}"
                                   partialTriggers="soc1">
            </af:inputText>

  • How can I move one CC program (Photoshop) to another hard drive?

    So I generally love everything about Adobe CC, but there's one huge downside I can't find a work around to - I want Photoshop (which I use 95% of the time) to be installed on my SSD, but the SSD isn't big enough to have the entire CC suite installed to it (and it would displace other applications I use more often). Is there some way I can install Photoshop to a different drive (in the same computer) as the rest of the CC suite?
    Thanks!

    Thanks Mylenium. Ironically that may encourage me to drop the subscription to the entire suite - running Photoshop off of a platter drive is painful and as much as I like having the rest of the apps I'm not sure I get enough use out of them to justify being forced to run Photoshop this way. This seems like a pretty obvious oversight by Adobe, hopefully they improve the app management within the Creative Suite.

  • How can I replace one low quality source with another high quality one ?

    Am I really this dumb or is it really this hard ?
    I have one timeline / project / edit that essentially references one long source clip / event / file.
    I have a newer higher quality transcoded version of the same source and want to replace the original lower quality version and end up with the same edited result just with better quality images !?
    It's the same frame rate and image dimensions  but "relink" tells me the new file is not "similar" enough and won't do it !
    Why is this so hard ? Is there a way to export a good old fashioned edl and then just reconform using the new source ?
    What if I wanted to to replace low res offline footage with finished colour-corrected material and output a finished master - would that be this clueless as well ?
    Please let me know the problem is between the chair and the keyboard - not between the hard disk and the power cord !

    Guessing that when you created the higher quality media, it was done outside of FCP and probably changed some important metadata that the app is looking for. Or perhaps there is a difference between the original audio and the new audio.
    Anyway, Luis' advice about the replace edit seems like the easiest solution.
    a_mumford wrote:
    What if I wanted to to replace low res offline footage with finished colour-corrected material and output a finished master - would that be this clueless as well?
    The usual way to do offline online is within FCP – creating the proxies and then using Preferences to switch back to and from.
    If you sent it out for grading, the Relink should work fine. If you haven't seen this kb doc, it's worth reviewing.
    Russ

  • How to read from one file and write into another file?

    Hi,
    I am trying to read a File and write into another file.This is the code that i am using.But what happens is last line is only getting written..How to resolve this.the code is as follows,
    public String get() {
         FileReader fr;
         try {
              fr = new FileReader(f);
              String str;
              BufferedReader br = new BufferedReader(fr);
              try {
                   while((str= br.readLine())!=null){
                   generate=str;     
              } catch (IOException e1) {
                   e1.printStackTrace();
              } }catch (FileNotFoundException e) {
                   e.printStackTrace();
         return generate;
    where generate is a string declared globally.
    how to go about it?
    Thanks for your reply in advance

    If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
    import java.nio.*;
    import java.nio.channels.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    class Kopy {
         * @param args [0] = source filename
         *        args [1] = destination filename
        public static void main(String[] args) throws Exception {
            if (args.length != 2) {
                System.err.println ("Syntax: java -cp . Kopy source destination");
                System.exit(1);
            File in = new File(args[0]);
            long fileLength = in.length();
            long t = System.currentTimeMillis();
            FileInputStream fis = new FileInputStream (in);
            FileOutputStream fos = new FileOutputStream (args[1]);
            FileChannel fci = fis.getChannel();
            FileChannel fco = fos.getChannel();
            fco.transferFrom(fci, 0, fileLength);
            fis.close();
            fos.close();
            t = System.currentTimeMillis() - t;
            NumberFormat nf = new DecimalFormat("#,##0.00");
            System.out.print (nf.format(fileLength/1024.0) + "kB copied");
            if (t > 0) {
                System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
    }

  • Communicate from one bounded task flow to another bounded task flow

    Hi All can someone let me know how to communicate from one bounded task flow to another bounded task flow.

    Hi,
    you use contextual events to communicate from one region to another. Have a look here:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_adv.htm#CACJBFGI
    Also keep an eye on
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html
    At the end of this week or beginning of next week I am recording a sample for this
    Frank

  • How can i delete one of my 5 computers from itunes? i need to rigistre a new computer...

    How can i delete one of my 5 computers from itunes? i need to rigistre a new computer...

    1)  Open itunes on the computer you want to deactivate. Make sure you are logged in.  Under the "Store" menu, pull down top "De-authorize this computer"
    2)  If you no longer have, or access to, the computer(s) you want to deauthorise,
    Log in to iTunes,  go to "view your account info" on the itunes store,
    Deauthorise all five,
    (Please Note: this can only be done Once every 12 months)
    Then re-authorize your current Computer(s) one at a time..
    Authorise / Deauthorise About  > 
    http://support.apple.com/kb/HT1420

  • When sending/receiving an iMessage (from gmail address) how can I then receive or access my iMessages on my actual gmail account/inbox?

    When sending/receiving an iMessage (from gmail address) how can I then receive or access my iMessages on my actual gmail account/inbox?

    Hi,
    The Messages app can join 5 different services.
    The "iChat Originals" that include AIM, Jabber and Yahoo (although they were added at different times to the app)
    The Bonjour account that has been present for LAN based Mac to Mac chat and lastly the iMessages account in the Messages app that iChat has become.
    Google email IDs can be used as a Jabber ID in Messages as Google run a Jabber server.
    As the Google server does not follow conventional naming formatting it has it's own Add option in Messages.
    Effectively all the services are separate.
    Any email used as an Apple ID can be the iMessages account.
    Of course this may be a Google one like you have that can also be used as  Jabber/GoogleTalk ID or it may be an Apple issued ID (@mac.com @me.com or @icloud.com) that will also work as a Valid AIM Screen Name.
    It may be that someone has their Yahoo email as their Apple ID.
    8:35 pm      Monday; August 11, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How can I transfer songs from one computers iTunes library to another library?

    How can I transfer songs from one computers iTunes library to another computers iTunes library?

    See Here
    iTunes: How to move your music to a new computer

  • How can i authorize music from one apple id acount to another

    how can i authorize music from one apple id acount to another? My IPhone 5 wont play my songs that were purches from my old apple id account

    timss22 wrote:
    how can i authorize music from one apple id acount to another?
    You cannot. iTunes purchases remain on the iTunes account they were purchased with.
    My IPhone 5 wont play my songs that were purches from my old apple id account
    So just upload them from iTunes.
    You have mulitple AppleIDs?
    Why?

Maybe you are looking for

  • ZEN Style M300 AutoShutdown

    Hello Creative's friends. I have bought 3-4 years ago, my beautiful mp3 player ZEN. In this player, which is very good to me but the storage of 4GB, i had a very suitable option to me, of Timer for Shutdown. Now i bought the ZEN Style M300 with 16GB.

  • Modifying aspect ratio of iTunes TV shows

    I recently downloaded the 2008 Stanley Cup Final on iTunes TV. The video is vertically distorted; that is to say, it plays back at a 4:3 aspect ratio when the video is clearly taken from the 16:9 HD broadcast. How do I set iTunes to play the video ba

  • Need bdc program for master recipe

    Hi All, Can any one please give me BDC code for Master Recipe Data Upload or is ther any standard program available to upload Master Recipe data?. Regards Sathish

  • Which Aggregation Rule to be followed?

    I have a logical Fact table A with logical table sources B,C,D B,C are Dimension and D is the Fact. And they are joined as follows Dim B---> Dim C---->Fact D So whenever i choose a metric from the Fact D its has to compulsorily go through these joins

  • Create Window Error

    Hi, Sometimes I get this error message: "Error 1 : Unable to create Window - OS Error : [1400]". Photoshop cannot create a panel and I have this error message with all the scripts, but it works after having restarted Photoshop. Do you know why ? Than