calling gui component from super class

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MiziaQ
    New Member
    • Nov 2007
    • 63

    calling gui component from super class

    how can i call a gui component (contentPane) from a super class to a different class ? Code would be appreciated. Thanks in advance
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by MiziaQ
    how can i call a gui component (contentPane) from a super class to a different class ? Code would be appreciated. Thanks in advance
    'Call something from a super class to a different class'? Please elaborate.

    kind regards,

    Jos

    Comment

    • MiziaQ
      New Member
      • Nov 2007
      • 63

      #3
      I have a JFrame which uses a splitpane, so i'm using two panes. I want to create a new class - one in which i can use the contentPane declared in the main class.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by MiziaQ
        I have a JFrame which uses a splitpane, so i'm using two panes. I want to create a new class - one in which i can use the contentPane declared in the main class.
        Pass it as a parameter to a constructor of your class.

        kind regards,

        Jos

        Comment

        Working...