Results 1 to 8 of 8
Like Tree2Likes
  • 1 Post By KevinWorkman
  • 1 Post By DarrylBurke

Thread: Tabbed pane within JPanel or JFrame

  1. #1
    Jeffrey Peter is offline Member
    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    0

    Default Tabbed pane within JPanel or JFrame

    I'm using Net Beans for creating a Java application. I thought of including a tabbed pane .... Should I include it within the JFrame or JPanel ?
    Please mention the merits and Demerits of doing so...
    Thanks in Advance...

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,038
    Rep Power
    10

    Default Re: Tabbed pane within JPanel or JFrame

    What do you think the merits and demerits of doing so are?

    I recommend you look into what's actually happening when you add a Component to a JFrame.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Jeffrey Peter is offline Member
    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    0

    Default Re: Tabbed pane within JPanel or JFrame

    I meant, is it mandatory to add a tabbed panel on to a Jpanel or I just can add it to JFrame ??

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,038
    Rep Power
    10

    Default Re: Tabbed pane within JPanel or JFrame

    What happened when you tried each?

    Again, I recommend you look into what's actually happening when you add a Component to a JFrame.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Jeffrey Peter is offline Member
    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    0

    Default Re: Tabbed pane within JPanel or JFrame

    I found that I need to add a scrollpane to add a Jtable...

  6. #6
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,038
    Rep Power
    10

    Default Re: Tabbed pane within JPanel or JFrame

    Quote Originally Posted by Jeffrey Peter View Post
    I found that I need to add a scrollpane to add a Jtable...
    I'm not sure what that has to do with your original problem, and it's not even true. You can have a JTable by itself, but a JScrollPane automatically handles the headers and scrolling for you, so it's usually a good idea.

    Here, I'll give you a hint: a JFrame has a content pane. What is that? How does it work with adding components to a JFrame?
    Jeffrey Peter likes this.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default Re: Tabbed pane within JPanel or JFrame

    To add to Kevin's hint: look up the API for RootPaneContainer, and interface implemented by JFrame and other Swing top-level windows.

    db
    Jeffrey Peter likes this.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  8. #8
    Jeffrey Peter is offline Member
    Join Date
    Oct 2012
    Posts
    4
    Rep Power
    0

    Default Re: Tabbed pane within JPanel or JFrame

    ok, I'll see it ...

Similar Threads

  1. Tabbed pane problem
    By franco in forum NetBeans
    Replies: 5
    Last Post: 10-23-2011, 09:38 PM
  2. Tabbed pane
    By sonal12 in forum AWT / Swing
    Replies: 13
    Last Post: 09-15-2010, 01:22 AM
  3. tabbed Pane .
    By programmer_007 in forum AWT / Swing
    Replies: 2
    Last Post: 09-03-2009, 09:52 PM
  4. JTree and Tabbed Pane
    By paluee in forum AWT / Swing
    Replies: 1
    Last Post: 03-30-2009, 07:03 AM
  5. Tabbed pane using struts 2.x......?
    By prabhurangan in forum Web Frameworks
    Replies: 1
    Last Post: 07-19-2008, 07:48 AM

Tags for this Thread

Posting Permissions

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