Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] default tab

Started by Xcdcc Nov 17, 2003 at 4:10 PM 0 replies 500+ views
Original Post
Xcdcc
Xcdcc
i was wondering how you would go about defining which is the default tab for a window(and i dont want it to necesarily be the first one all the time) using the swing library if that info is needed(dont know much about java but this is for a small part of a database assignment) [edited by - xcdcc on November 17, 2003 5:13:48 PM]
CaptainJester
CaptainJester
There is no default tab. You can select the tab that will be displayed using:

void setSelectedComponent(Component c)
Sets the selected component for this tabbedpane.
void setSelectedIndex(int index)
Sets the selected index for this tabbedpane

Read the API docs. They are a fountain of information.



First make it work,
then make it fast.

--Brian Kernighan

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)

Do not interrupt your enemy when he is making a mistake. - Napolean Bonaparte
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.