Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 814203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:28:54+00:00 2026-05-15T01:28:54+00:00

First of all I’m using netbeans as my IDE and I don’t know if

  • 0

First of all I’m using netbeans as my IDE and I don’t know if this is causing it. When I run my program (even if I have build it and run the .jar) I think it selects the tab that was previously selected (before quiting). So if for example I close the app with the third tab selected, it starts up with that selected again. Is there a known solution for this? The selectedIndex property on the jTabbedPane is set to 0. Shouldn’t this property be the default onLoad value?

Thx in advance, Jimmy

PS. BTW for some reason it didn’t submit my question in Opera (?)

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:28:55+00:00Added an answer on May 15, 2026 at 1:28 am

    Same problem here with Netbeans 6.8 and JTabbedPane. Neither setSelectedIndex() nor setSelectedComponent() makes a difference. The getSelectedIndex() returns the value previously set, but the pane is not selected correctly.

    The reason for this is that the SingleFrameApplication saves it’s state and restores the saved state on the next restart. This is done in the code generated by the GUI builder.
    You could see that startup() and configureWindow() methods of the SingleFrameApplication are overridden.

    Workarounds:

    1. You could override the shutdown() method as well, then modifications to the configuration will not be saved. Note that the original will still be restored, so ensure that the required configuration is saved.

    2. Modifying the startup() method also helps:

    MyView myView = new MyView(this);
    myView.getFrame().setVisible(true);
    myView.getFrame().pack();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First of all, I know how to build a Java application. But I have
First of all, apologize because I have seen some posts about this, but I
First of all this is all just concept, I have no actual programming done
First of all, let me clarify that I know you cannot have actual abstract
First of all (in case this is important) I'm using ActiveState's Perl (v5.8.7 built
i have this code which i use in order to extract first all users
I have this code below, with which I select first all id's from table
First of all, this isn't for a keylogger, it's for an input in a
first of all i would like to say i know its probably an easy
First of all there is probably a question like this already but i couldn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.