Results 1 to 10 of 10

Thread: reference to parrent component

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2004
    Posts
    222

    reference to parrent component

    How to get referende to parrent component?

  2. #2
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: reference to parrent component

    super();

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2004
    Posts
    222

    Re: reference to parrent component

    Thanks
    is there any way to find top most component without looping?

  4. #4
    Frenzied Member System_Error's Avatar
    Join Date
    Apr 2004
    Posts
    1,111

    Re: reference to parrent component

    What do you mean by that? The top most level is the Object class. Are you talking about trying to get a reference to a component that is at the very top of the frame?

  5. #5
    Frenzied Member oceanebelle's Avatar
    Join Date
    Jun 2005
    Location
    my n00k.
    Posts
    1,064

    Re: reference to parrent component

    just have a reference of the topmost frame w/in your class. ... If you don't want to loop it.

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: reference to parrent component

    I think he means component in the swing sense, which you get by calling getParent().
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: reference to parrent component

    Back from where? I've been here all the time - just didn't find many questions that tickled my fancy.
    In fact, I'll be gone for three weeks now.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418

    Re: reference to parrent component

    Posted by CornedBee

    Back from where? I've been here all the time - just didn't find many questions that tickled my fancy.
    I was just kidding.

    In fact, I'll be gone for three weeks now.
    I don't remember authorizing any vacation time.

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Mar 2004
    Posts
    222

    Re: reference to parrent component

    I mean, to get reference to the JFrame but getParent() gives me contentpane.

    I am using my menu in a different class and and I attached it to Jframe in diffrent class now I want to reference the JFrame for the menu.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width