How to Get object that a JPanel belongs to.

I created an object that has a JPanel. When that JPanel is clicked, how can I get the object to which its a GUI data member of?

Hi,
If you try JPanel.getParent() it will return the Container that it is in.
If what you want is the creator you can derive from JPanel and add a constructor that has the creator as its only parm.
  JPanel panel = new JPanel(this);
public class MyPanel extends JPanel {
  Object myCreator;
  public JPanel(Object creator) {
     super();
     myCreator = creator;
}Now you can use myCreator to access that class that created it.
Paul

Similar Messages

  • I set up my iPhone through iCloud but assigned the wrong cell number to it so I am getting messages that don't belong to me but rather to my husband as I entered his cell number in there - how do I change that number to stop this from happening??

    I set up my iPhone through iCloud but assigned the wrong cell number to it so I am getting messages that don't belong to me but rather to my husband as I entered his cell number in there - how do I change that number to stop this from happening??

    Also, if you are sharing an Apple ID, you will get his iMessages.

  • I am trying to set up my apple tv on a sony KDL - 40xbr4. The remote is a sony RM-V302. I plugged it into the HDMI IN on the side of the TV but cannot find out how to get to that input. I am at a winter rental property and brought my Apple TV with me.

    I am trying to set up my apple tv on a sony KDL - 40xbr4. The remote is a sony RM-V302. I plugged it into the HDMI IN on the side of the TV but cannot find out how to get to that input. I am at a winter rental property and brought my Apple TV with me. I did check internet for solutions. The instructions I found said to use a "home button" on the remote.  There isn't one. I sure would appreciate help if someone knows a solution.  My first post - hope I did this right.

    if its anything like my Sony, theres a button top left corner that upon each press i get an audible bleep and the AV inputs come up on screen, i then cycle down to whichever input i wish to select!
    in case your remote is different, the button on my remote has a square with a slightly smaller square just overlapping the first square.
    hope that helps?
    rgds Lee.

  • So, I made my account a while ago before I had an iPhone so I can get music. The result of that I can't remember my security questions, and it tells me to send a rescue email an alert, but it doesn't show you how to get to that page. Can someone help me?

    So, I made my account a while ago before I had an iPhone so I can get music. The result of that I can't remember my security questions, and it tells me to send a rescue email an alert, but it doesn't show you how to get to that page. I am getting quite annoyed because apples hours arent the best fitted to my scedule since I have school and work, so I cant call and ask how to get fixed. Please help me all I want to do is buy some music...

    Click here and fill out the form.
    (90729)

  • I disabled my iPhone 4 and while doing a restore via iTunes,  it is downloading and timing out so the download is not completing. any idea how to get past that?  I have tried many times and the same error keeps happening.

    I disabled my iPhone 4 and while doing a restore via iTunes,  it is downloading and timing out so the download is not completing. any idea how to get past that?  I have tried many times and the same error keeps happening.

    You need to force the phone into recovery mode, as described here, & restore it:
    http://support.apple.com/kb/ht1808
    Sorry, you've already lost all data on your phone.

  • How to get BufferedImage of a JPanel

    Can anyone tell me : how to get BufferedImage of a JPanel

    I've done something like this:
    import java.awt.Graphics;
    import java.awt.LayoutManager;
    import java.awt.Dimension;
    import java.awt.image.BufferedImage;
    import java.io.InputStream;
    import java.io.FileInputStream;
    import javax.swing.JPanel;
    import com.sun.image.codec.jpeg.JPEGCodec;
    import com.sun.image.codec.jpeg.JPEGImageDecoder;
    * @author Martin Breton
    public class JBackgroundImagePanel extends JPanel {
         private BufferedImage mImage = null;
         private InputStream mImageStream = null;
         public  String mImageFilename = null;
         public JBackgroundImagePanel( String ImageFilename ) {
              super();
              mImageFilename = ImageFilename;
              initialize();
         public JBackgroundImagePanel( BufferedImage ImageFilename ) {
              super();
              mImage = ImageFilename;
              initialize();
         public JBackgroundImagePanel( InputStream ImageStream ) {
              super();
              mImageStream= ImageStream;
              initialize();
         private  void initialize() {
              if(mImage == null)
                   try {
                        ClassLoader Loader = this.getClass().getClassLoader();
                        if( mImageStream == null )
                             mImageStream = Loader.getResourceAsStream(mImageFilename);
                             if( mImageStream == null )
                                 mImageStream = new FileInputStream( mImageFilename );     
                        JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( mImageStream );
                        mImage = decoder.decodeAsBufferedImage();
                        mImageStream.close();
                   catch(Exception e){
                        System.out.print("Image could not be loaded in JBackgroundImagePanel.");
              this.setSize(mImage.getWidth(),mImage.getHeight());
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              g.drawImage(mImage, 0, 0, null);
    }Hope this helps.
    proxi

  • How to get alert that Tenant's VM is up?

    hi guys... how to get alert that tenant vm is up?

    Hi Weili,
    >>it will call the script function to run the measuring vm usage.
    Could you please detail "measuring vm usage" ?
    I mean which usage will be measured .
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to get object key before load data into form?

    I need to get object key (e.g. ItemCode in Item Master Data From ,docEntry in A/R Invoice From) to calculate and do something  before data is loaded into this form .
    I try to use SAPbouiCOM.BusinessObjectInfo.objectKey as in this code.
    Private Sub oApp_FormDataEvent(ByRef pVal As SAPbouiCOM.BusinessObjectInfo, ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
           If pVal.FormTypeEx = "672" And pVal.BeforeAction = True And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_LOAD Then
                   oApp.MessageBox(pVal.ObjectKey)
           End If
    End Sub
    But this fields doesn't valid under this condition (form DI help file).
    - The property returns an empty value in the before notification of the Load action (et_FORM_DATA_LOAD) triggered by a Find operation.
    How can I get this value(key)?

    Janos
    I can't do a calculation after data is loaded because what I'm going to do is that if the opening entry match my condition , the system will not let that user see that entry (bubbleEvent = False).
    I think when formDataEvent is triggered B1 know which entry are going to load because before this event is triggered we did one of following ways
    1. choose from "choose from list windows"
    2. enter docEntry or itemCode or cardCode  and then press Find Button
    3. press "next/previous record button"
    4. press linked button (orange arrow)
    Choice 3 and 4 can be done by retrieve data from BusinessObjectInfo.objectKey (I've tested and it return entry key that is going to open correctly).
    but 1 and 2 can't (it return empty as I mention before).
    thanks
    Edited by: daron tancharoen on Aug 5, 2008 2:34 PM

  • How to get Object Name

    hi
    i make a widget in flex for Captivate5.5, now i want to get my Object Name(widget->Animation->ObjectName) in flex , how can i get that name
    how can i get Object Name in Flex Dynamically....

    thnx Jim Leichliter for ur replay
    i'm using  http://blogs.adobe.com/captivate/2010/10/flex-based-widgets.html classes,

  • How to get object?

    Hi,
    I have a generic question on how to get the object if the all known is the name of
    the object (string).
    For instrance, if the name of the user is given, how can I get the DirectoyObject of
    that user so that I can call removeMember(DirectoryObject member) method to
    remove it.
    Similarly, if the name of grantee in ACE is given and reftype = 'name' in XML, how
    can I get the ACE object so that I can call
    removeAccessControlEntry (AccessControlEntry ace) method in AccessControlList
    class.
    Thanks.
    Jinren

    Jinren,
    oracle.ifs.common.Collection c = ifsSession.getDirectoryUserCollection();
    DirectoryUser user = (DirectoryUser)c.getItems("user");
    This is quite an expensive operation if you have an extremely large number of users.
    We did and we found this method unusable on an NT platform with anything over a few thousand users.
    What we do is use the SQL views on the iFS schema to look up the object id number.
    e.g.
    select user_id from ifs_users where name='bob';
    We do this with JDBC calls straight to the ifs schema.
    Once you have the user_id you can use the
    public PublicObject findPublicObjectById(java.lang.Long id)
    function in oracle.ifs.adk.filesystem.IfsFileSystem
    to get the PublicObject with that Id.
    You can then downcast the PublicObject to a DirectoryUser.
    Grubby, but FAST!
    Hope this helps.
    Paul

  • How to get objects necessary for transporting Business Content?

    Hi Experts,
    Small ques for u:
    I have installed 0FIAA_C11, 0FIAA_C12, 0FIAA_C13 for Asset Accounting in Dev system. Already the previous content 0FIAA_C04 was installed and transported to Quality system.
    Now I want to transport new content (0FIAA_C11, 0FIAA_C12, 0FIAA_C13) to Quality. But I guess since already some infoobjects were transported to quality, transport connection wud nt show me all necesary objects.
    <b>So how to get a list of all objects necessary</b> so that my req does nt fail while moving to production from quality.(I think req might not fail while goin from Dev ->quality).
    Thanks in advance!!
    Sorabh

    Hi Srini,
    I have already applied "Before setting". But the problem is I dont want to transport objects which are not relevant to me, but only those which are necessary for content described in previous mail.
    If we check the link provide by you " For activating an InfoSource, InfoObjects may also be necessary which are not contained in the InfoCube and have therefore not yet been collected. However, for these additional objects, the objects that come before them in the data flow are not collected.
    "  I am worried by about these.Some objects will be missing and some are in addition which are not all required, and we shud nt transport them.How to be sure tht transport will not fail and it is consistent as well?
    Thanks for replying!!
    Sorabh
    Message was edited by: sorabh arora

  • Any Pointers on how to get object list values and component values in iw32

    Hi,
    I have a requirement where whenever a user enters a creates(iw31) or changes(iw32) an order then we have to validate the materials entered by the user before saving the order.We have en interface structure for the transaction 'CAUFVD'.Which gives us the values of functional location and equipment entered under the Reference object.But we need to validate all the object list functional locations and also Order components enetered by the user.Can any one tell me how to get the values of all these fields entered by the user?
    And also I need to query Equipment Bill of Material.What does this equipment BOM refers to .Is it the equipments under Object list or something else.
    Please Help.
    Thanks

    Hi Anu
    There is a user exit that gets trigerred when you try to save a work order . The exit is 'EXIT_SAPLCOIH_009' . This exit has the structure CAUFVD_IMP which will give you all the order header values entered by the user.
    User exit 'EXIT_SAPLCOBT_001' will give all the values entered by the user including order components. Also check the package CO  amd see if there is any other function group suiting your requirement.
    hope this helps you.
    cheers
    shivika

  • How to get object which is created previously?

    Hi ,
    My question is that how to get reference of the object which is created previously using reflection API.
    that means,
    suppose i created one instance of class : ABC
    Class classAbc = Class.forname("ABC"); //load the class ABC.
    Object abcClassObject =classAbc.newInstance(); // create an instance of classABC.
    now how do i retrieve that object which is referred by ref. variable abcClassObject?
    expecting a favourable reply,
    Thanks & regards ,
    Swapnil

    My question is that how to get reference of the object which is created previously using reflection API.
    Object abcClassObject =classAbc.newInstance(); // create an instance of classABC.
    now how do i retrieve that object which is referred by ref. variable abcClassObject?abcClassObject is already a reference to it. Just use it. Nothing further required.

  • How to get object-path at runtime

    Hi, In my application paths of particular controls(radio buttons and links) get changed at runtime. Therefore I cant access those objects. It would be helpful if somebody guide me how to get paths of objects(controls) at runtime. To be more specific following are the paths procured on different time ie. on different runs.
    "window(name='incident173747')[1].window(name='ifrmTabWindow')[1].input(name='generateQuote')[1]"
    "window(name='incident173750')[1].window(name='ifrmTabWindow')[1].input(name='generateQuote')[1]"
    One can see only first window name is changed here.In first case it is :
    name='incident173747'
    while in the second one it's:
    name='incident173750'

    Hi Vivek555,
    How do you know which radio button or link you want to click on? If each one is called generateQuote, what is in on the page that says "This is the one I want to click on".
    Please give a snippet of the html for the page so that we can help you out.
    Thanks,
    Kevin Gehrke
    Empirix, Inc.

  • How to get OBJECT for FI Doc number?

    HI Experts,
    I want to use FM NUMBER_GET_NEXT to get the next doc number for FI document, But there have a parameters in this FM is OBJECT, can any friends tell me how to get this parameters for FI doc?? Thanks in advance and your be rewarded once it is helpful.

    Hey Joe,
    The object and other details are configured in the transaction  'SAP number Ranges'' SNRO.
    I do not know under what circumstances you want to use the FM 'GET_NUMBER_NEXT' but doing this will increase the current number in the number range by 1.
    If you are planning to pre determine what is the number of the FI document that will be created, then this is not the right solution.

Maybe you are looking for

  • I delete emails on Centro, but they still take up tons of memory.

    I'm running VersaMail 4.0.1.00 on my Sprint Centro, which carries 68.8MB of usable memory.  When I go to Info (Menu + I from the Home screen), it tells me that I have <1MB of memory left, primarily because the Email application takes up 38,936K. (The

  • Passing multi-value parameter from BIEE dashboard to BIP report

    It is possibile passing multi-value parameter from BIEE dashboard prompt to BI Publisher integrated report? (BIP report has a DB data source (not a answers)) Thank you R.

  • Macbook Pro and 30" Cinema display for gaming?

    Does anyone know if a Macbook Pro (17" i7 2010) would be powerful enough to drive the 30" Cinema display (or a Dell 30") specifically for gaming to a reasonable performance FPS with a game such as Call of Duty 4? Would I have to knock down the resolu

  • Problems w/ Adobe Flash Player

    Hi. I have a Sony VAIO Notebook PC (2.4GHz Pentium, 1 GB RAM, Windows XP Home (SP3). I recently had to return my HDD to its original factory settings. Prior to this time I encountered no problems w/ the flash player. When I go to install my hp PhotoS

  • Changing account for iPad

    My iCloud account will not accept my password