• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FBNS: Customer are searching db.db via what?

 
George Ren
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I recently found there are lots of columns in the db.db file. Such as Flight Number, Origin airport, Destination airport, Carrier so forth.
My question is Which of them does tht customer use to search the Flight? All I should enable the customer to use any of them to search? If that is true, there will be lots of JCombobox and Textboxs, if the customer don't select all of them, that means only use some of the Comboboxes and testboxes, I think I should assembled them together in order to search, I think there will be large ammount of work.
So, I confused whether my analysis is correct?
Pls Guide me.

Regards,
George
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
while the Instructions.html file doesn't exactly spell it out, because there are two areas where it seems that they are mentioning what they can search on. So I took it from both and included; Airline, Arrival Airport, Departure Airport. Not necessarily in that order.
I got to go to a meeting. I'll post again to finish this.
Mark
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
You can also simply offer a dialog box that allows the user to type in what they want, per the instructions. Then usedregex to sort the String. It's not that hard, really.
M
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm back.
My final statement is that you should use JComboBox for all three. Do not use JTextField, we have found that you will lose points if you do.
Mark
 
George Ren
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u , Mark and Max.
So it that mean the customer only use the Airline, Origin airport and Destination airport to search. I only have to design the three JComboboxes for that?
Or I should be like Max said. It will be up to the customer?

Regards,
George
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by George Ren:
Thank u , Mark and Max.
So it that mean the customer only use the Airline, Origin airport and Destination airport to search. I only have to design the three JComboboxes for that?
Or I should be like Max said. It will be up to the customer?

Regards,
George

Either will work: it's just a matter of writing GUI code or regex code.
 
George Ren
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I understand. Thanks.
But Max ,could u tell me what the "regex code" mean? I havn't heard it before.

Regards,
George
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11915
209
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi George,
But Max ,could u tell me what the "regex code" mean? I havn't heard it before.

Max is talking about the server side, where you need to validate that the string passed to criteriaFind is correct, and extract the column names and values to match from the provided String.
Max is suggesting you use regular expressions, (commonly referred to as regex) which you will find in the java.util.regex package.
If you have never used regular expressions before, you may want to look at them. They are extremly powerful. They can also be difficult to master (which is one reason for looking at them now: you have the time to learn new things - in a real job you may not have the luxury of time).
But you don't have to use regular expressions, there are plenty of other ways that also work. Perhaps not as elegant as regex, but certainly valid nonetheless.
Regards, Andrew
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes George you would only need three JComboboxes.
Mark
 
George Ren
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank u all. I have finished my GUI file already.
No problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic