Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

client .....

 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody:
For the GUI where origin and destination of flights are used, I tried using a JTextField. But then realised what if someone enters sANFrancisco or SanFrsco instead of SFO there. Are we supposed to format all that? I am thinking that a JList will put these problems away. What do u guys think? What did u guys do?
One more question: Is it a problem using any other compiler other than 1.2 for RMI. I am working on a Java 2 assignment but using a "1.3.1_02" compiler. Do any of you guys perceive this to be a problem.
Mark, HS: I did skim through some post about some problems that you both had. I would appreciate any comments from you guys.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about using a JComboBox instead of the JList.
If you use the JTextField, you will have formating issues. But if you happened to use 1.4 then you could use Regular Expressions to handle that for you.
But I suggest the JComboBox.
I think there might be a compatibility issue with rmic and the sdk/jre that you use. I mean that we all use, not your particular configuration.
Mark
[ November 11, 2002: Message edited by: Mark Spritzler ]
 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the instructions, it says cleary, "Throughout this exercise, you must use exclusively the Java 2 platform. You are not required to develop your code using any particular implementation of the Java 2 platform".
So I guess, I do not have any option, I have to install the Java 2 compiler.
 
Mag Hoehme
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prakash,
JDK version 1.3.xxx is actually Java 2. The latest version is 1.4.1.
Hope this helps.
 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks mag!
 
Pervez Ahmed
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While we're on the topic of JComboBox's, how did you all populate them? Hard-coded, or did you read the database and get all origin/deparature cities?
 
Prakash Krishnamurthy
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pervez:
I have not implemented the JComboBoxes, but yes, i do not wish to hard code it. I am thinking of doing it by getting all the records from the database
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to get the unique values from the Database. I used the criteriaFind method passing it "All" to return all records, then looped through them adding them to a HashSet, which doesn't allow duplicates, and then making them a String[]
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic