🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11148

Re: jComboBox

#11148
From: Greg Hamer
Date: Thu, 01 Jul 1999 00:00
29 lines
1595 bytes
I assume that you only see this message when you are designing. Yes, it
is a harmless bug. The designer does not execute statements in the
jbInit method in the order that they appear in the source; the
setSelectedIndex call ends up happening before the add calls have been
performed. The designer knows to generate the code in an order that will
work at runtime however.

Bernhard Buser wrote:

> I used jTabbedPane with 5 panels in jBuilder 3.
>
> When I code: jTabbedPane1.setSelectedIndex(1), I get a warning:
>
> Warning: cannot set "selectedIndex" property for jTabbedPane1 --
> java.lang.ArrayIndexOutOfBoundsException: 1 >= 0
>
> the "setSelectedIndex" is the last instruction and has been
> added by jBuilder (when changeing TabbedPane properties).
>
>     jTabbedPane1.add(jPanel1, "jPanel1");
>     jTabbedPane1.add(jPanel2, "jPanel2");
>     jTabbedPane1.add(jPanel3, "jPanel3");
>     jTabbedPane1.add(jPanel4, "jPanel4");
>
>     jTabbedPane1.setSelectedIndex(1);
>
> Am I wrong or is this a bug??
>
> regards Bernhard
Technical Details
Message-ID: <377B9E58.5268EBDC@borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3771C5FE.6197B45A@buser.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,fef21cd5f7e5e0c2
X-Google-Attributes: gid111d45,public
From: Greg Hamer <ghamer@borland.com>
Subject: Re: jComboBox
Date: 1999/07/01
Message-ID: <377B9E58.5268EBDC@borland.com>
X-Deja-AN: 496078052
Content-Transfer-Encoding: 7bit
References: <3771C5FE.6197B45A@buser.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing