Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Preventing the unrolled list of a JComboBox to close

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings


I created a class inheriting from JDialogBox : JDialogB_ComboBEdition . I combined an own JDialogB_ComboBEdition object to the 'mouseClicked()' function of a MouseListener, to have a dialog box getting opened when the user clicks left in the text field of the closed combo box.
It works fine ... at first sight.
The dialog box pane contains some buttons and one edition JTextField which will enable
- an item of the unrolled list to be moved upwards or downwards
- to delete an item
- to edit the text of a pre-selected item.

Problem : When clicking in the upper text field of the combo box, the list unrolls, as expected. but closes when the dialog box frame is displayed, that is almost immediately.
How could I keep the unrolled list opened, and later refreshed, so that the user is helped when he activates controls in the combo box. Even if it means that I would use explicitely an API method to close the unrolled list programmatically.
This has anything to do with UIComboBox, isn't it ?

Please, some useful guidance ...
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic