Thread View: comp.lang.java.programmer
2 messages
2 total messages
Started by Ramon F Herrera
Sun, 30 Jun 2002 23:05
Dynamic Tabbed Panes in JBuilder?
Author: Ramon F Herrera
Date: Sun, 30 Jun 2002 23:05
Date: Sun, 30 Jun 2002 23:05
25 lines
1884 bytes
1884 bytes
Borland JBuilder 7 SE Swing JTabbedPane This is my first non-trivial application. What it does is to make a SQL query to an Oracle database (that part is solved, piece of cake) and then it displays the results in a nice and friendly format. The SQL query will return a few records (a minimum of 1 and a maximum of about 6), but my application, being version 0.x, can currently handle the display of only one record. That's where I am stuck. I want to use several JTabbedPanes for my output, but I don't know exactly how to achieve this using JBuilder's IDE. After all, in most applications the number of tabbed panes is known at design time, but in my case, the program will only know how many panes are needed after the SQL query is performed. Shuould I prepare a maximum of, say, 6 Tabbed Panes and only use as many as actually needed? Is there -I hope so!- a better solution? Thanks in advance for your kind assistance, -Ramon F. Herrera
Re: Dynamic Tabbed Panes in JBuilder?
Author: Thomas Weidenfeller
Date: Mon, 01 Jul 2002 09:00
Date: Mon, 01 Jul 2002 09:00
20 lines
1807 bytes
1807 bytes
ramon@conexus.net (Ramon F Herrera) writes: > I want to use several JTabbedPanes for my output, but I don't > know exactly how to achieve this using JBuilder's IDE. You take the editor, and implement it, instead of using the GUI builder. GUI builders usually fall short if you have to have a dynamically changing layout. > Shuould I prepare a maximum of, say, 6 Tabbed Panes and only > use as many as actually needed? Well, I wouldn't do it, but you can try. But you will have to dynamically remove and add JPanels to the JTabbedPane, because otherwise the unused JPanels will still appear as tabs on the JTabbedPane. So I don't think you will gain much. Write a simple loop that adds one panel for each of your results to the tabbed pane. /Thomas
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads