• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

JTabbedPane problem

 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to add 3 tabs into a JTabbedPane, but when I try to add the 3rd one, I get the following exception, if I add 2 tabs I DON'T get any exception.
The code is:

The exception is


java.lang.ArrayIndexOutOfBoundsException: 2 > 1
at java.util.Vector.insertElementAt(Vector.java:551)
at javax.swing.JTabbedPane.insertTab(JTabbedPane.java:441)
at javax.swing.JTabbedPane.addTab(JTabbedPane.java:480)
at nurse.report.CoverageReport.init(CoverageReport.java:251)
at nurse.report.CoverageReport.main(CoverageReport.java:357)


The exception occures at the last line of code.
Thank you
Garandi
[ January 30, 2003: Message edited by: Garandi Garandi ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please post more code than that? Specifically where you initialized your entire JTabbedPane, and not just where you are adding tabs. The all the code for that Class would probably be best.
 
Garandi Garandi
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Gregg.
This is the code for the application.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!