• Advertisement


This topic is now archived and is closed to further replies.

[java] default tab

This topic is 5207 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites

  • Advertisement