• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

client .....

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
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 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks mag!
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Well don't expect me to do the dishes! This ad has been cleaned for your convenience:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic