• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

My thoughts about the search dialog implementation

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I saw many questions in this forum about the implementation of the gui search dialog. Often the question was whether to you use textfields or comboboxes.
I think this is definitly not a question because comboboxes can be used in the same way as textfields. Make the combobox editable and you have a textfield. Furthermore the approach to use only comboboxes if much more user friendly because you can store unique input values of the user in the combobox so that if the user decides to do another search all previously entered criteria is still available and has not to be entered once again.
Additionally if you want to provide prefilled comboboxes, meaning that all the distinct values of a db column should appear in a combobox provide flags to indicate that these values should come from the database and should not be entered manually by the user.
I think this is the most flexible and most user friendly way to present the search dialog.
JMHO.
Best of luck...
jay
-----
SCJP2
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi jay,
in my implementation, I have used the Editable JComboBox, so the user can type its search value or select the "ANY" item of the combo.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i used 3 non editable jcomboboxes, and populated them with lists of unique and ordered values each time a new connection is successfull. i prefered that to hardcode the values or insert them (as i did with all magic values) in a ClientConstantsInterface.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
this is how I understood the task: The implementation of the search method in the Data.class should work for any criteria. The dialog, however, must work for a specified set of criteria.
Check your instructions! I feel that there are different assignments that require different search criteria.
And that's how I implemented it in the GUI: My instructions required two search criteria. I had two combo boxes in my toolbar. On loading the data, the combos were filled with the respective options, in addition to the wildcard option.
Hope this helps.
 
jay denzel
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I did not want to cause any confusion about this. I just wanted to share my thoughts. My gui design and criteriaFind implementation is totally generic, this means you are not bound to the field structure of the supplied db.db file. I wanted to be as much generic as possible to support extending the assignment later on, like Sun says in the assignment. Therefore you can use any field for searching, any number of fields can be used for display in the dialog, and any field can be prefilled with distinct database values or not.
greets
jay
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mag,
Can I ask how were you able to load the origin and destination sites? Hard coded?
 
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic