Mailing list - Entries of 2005

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] Clicking JComboBox

  • Subject: Re: [qftestJUI] Clicking JComboBox
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Mon, 11 Jul 2005 07:52:06 -0000

Hello Bastian,

there is no need to name automatically generated sub-components of
Swing components like JComboBox. qftestJUI will find these without the
name as long as it finds the component itself for which a name is
indeed very useful.

I suppose your actually looking for a way to get rid of the "Missing
name" warning, correct? That warning is only intended to make you
aware of missing names, not for general use. You can turn it off
through the option

Replay->Component recognition->Log warning when name is missing.

If that's not the problem, please elaborate.

Best regards,

Bastian Bowe <Bastian.Bowe@?.de> writes:

> Hello,
> is there a way to click and record a JComboBox in a intuitive way? The
> problem we are facing is that almost all of our important components are
> named via setName() including the JComboBoxes. Unfortunately does
> recording a click on a JComboBox result in a click on a unnamed button
> component.
> We found out that we could record all subcomponents of a panel and then
> extract the JComboBoxes. Now we could copy their ids and modify the MPRC
> Events accordingly. This is not practical to us because it's too much
> work. Naming the buttons in Java isn't either because it would end up in
> stupid code hard to maintain like this:
> JComboBox rcb = ...
>   ((javax.swing.plaf.basic.ComboPopup) rcb.getUI()
>                     .getAccessibleChild(rcb,
> 0)).getList().setName("ListFoo");
>                 rcb.getComponent(0).setName("ButtonFoo");
> Are there better solutions?
> Best regards
> Bastian
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH           
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876