Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    7
    Views
    2,353

    [SOLVED] Re: How to close all tabs in JTabbedPane?

    Look at this part of the error message:

    It says that the listener at line 79 did a getTitleAt() with -1.
    Add code to test the value of the selected index.


    BTW 0 is a valid index.
  2. Replies
    7
    Views
    2,353

    [SOLVED] Re: How to close all tabs in JTabbedPane?

    I just wrote a small test program and used removeAll() with no problem.
    I must be something else causes the error.

    Can you make and post here a small program to demo the problem?
  3. Replies
    7
    Views
    2,353

    [SOLVED] Re: How to close all tabs in JTabbedPane?

    Looking at the stack trace I don't see a call to the removeAll method. Are you sure that is where the error is happening?
Results 1 to 3 of 3