Results 1 to 2 of 2
  1. #1
    Stephen Douglas's Avatar
    Stephen Douglas is offline Senior Member
    Join Date
    Mar 2010
    Posts
    137
    Rep Power
    0

    Default Dynamically adding JPanels to the JTabbedPane !!

    Hey guys... i am trying to add jpanels to the jtabbedpane dynamically.. Initially at startup the JTabbedPane will have no tabs. but i need to add panels equal to the number of entries in the table (dynamic) in the database..:confused:

    please suggest. thnx
    The Quieter you become the more you are able to hear !

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,337
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Stephen Douglas View Post
    Hey guys... i am trying to add jpanels to the jtabbedpane dynamically.. Initially at startup the JTabbedPane will have no tabs. but i need to add panels equal to the number of entries in the table (dynamic) in the database..:confused:

    please suggest. thnx
    Did you read the API documentation for the JTabbedPane class? I bet not because you would've read about its add( ... ) method that adds a single tab to the component. Imagine that method inside a while loop where you're fetching data from your database. That doesn't take rocket science. Read the API documentation before you start asking for the obvious answers.

    kind regards,

    Jos

Similar Threads

  1. How to expand the JPanels dynamically?...
    By Vin in forum New To Java
    Replies: 6
    Last Post: 01-27-2010, 12:58 PM
  2. Adding contents inside the JTabbedPane
    By javanewbie in forum New To Java
    Replies: 1
    Last Post: 05-27-2009, 12:02 PM
  3. Problem Adding Content To JTabbedPane
    By JDCAce in forum AWT / Swing
    Replies: 5
    Last Post: 10-18-2008, 09:45 AM
  4. Adding JPanels to JFrames based on x-y co-ordinates
    By aneesahamedaa in forum AWT / Swing
    Replies: 4
    Last Post: 07-24-2008, 10:41 PM
  5. Adding Tabs to JTabbedPane
    By blackstone in forum AWT / Swing
    Replies: 2
    Last Post: 11-14-2007, 03:15 PM

Posting Permissions

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