Results 1 to 3 of 3
  1. #1
    David1234 is offline Member
    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0

    Default What does getContentPane mean?

    what does this line of code mean:
    Container c = getContentPane();

    what is a container and what does getContentPane() do?

  2. #2
    Zyril is offline Senior Member
    Join Date
    Oct 2011
    Location
    Sweden
    Posts
    124
    Rep Power
    0

    Default Re: What does getContentPane mean?

    A container is an AWT / Swing object that can hold other components. It's like a drawing area where you assign it to use a layout manager to determine how and where other components are placed.

    I suggest that you read into it in the Java tutorial where it is covered:

    Using Top-Level Containers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)

    --

    Perhaps just use one topic next time..

  3. #3
    David1234 is offline Member
    Join Date
    Aug 2012
    Posts
    3
    Rep Power
    0

    Default Re: What does getContentPane mean?

    Thanks a lot. Next time i will use only one topic.

Similar Threads

  1. getContentPane not displaying text
    By roguecowboy in forum AWT / Swing
    Replies: 3
    Last Post: 08-08-2011, 05:52 AM
  2. Difference between add() and getContentPane().add()?
    By AcousticBruce in forum New To Java
    Replies: 3
    Last Post: 02-17-2011, 06:18 PM
  3. Replies: 1
    Last Post: 02-27-2010, 12:35 AM

Posting Permissions

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