Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

B&S connection to the server

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!

I'm thinking, in the client mode, let the user fill just the IP address of the server (and port), instead of IP or host name...
But searching the forum, I saw that most people use both options...
Do you guys think I would loose points for this?

Thanks!!
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Lucas!

Well champ, that's what I did. In my config dialog, the user enters the IP address and port number in which the server is running in the given IP address.

I'm not sure, but I think that there should be a mapping host name X IP address somewhere in your OS (i.e. hosts.sam) so the application is able to resolve correctly the host name, right? I never tried that, so I don't know if even that would work...
 
Lucas cotta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Roberto Perillo wrote:Howdy, Lucas!
Well champ, that's what I did. In my config dialog, the user enters the IP address and port number in which the server is running in the given IP address.
I'm not sure, but I think that there should be a mapping host name X IP address somewhere in your OS (i.e. hosts.sam) so the application is able to resolve correctly the host name, right? I never tried that, so I don't know if even that would work...



Yes but I just want to keep the GUI simple and let the user just enter numbers, in a field that will have a mask for IP address (___.___.___.___)

Thanks for the answer!!
 
Roberto Perillo
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Lucas cotta wrote:Yes but I just want to keep the GUI simple and let the user just enter numbers, in a field that will have a mask for IP address (___.___.___.___)



Alright champ, that's an approach. What I did is, I created a subclass of PlainDocument, where the user can only insert numbers or a dot. To validate the IP address, I created a custom validator (I had an interface called Validator with a few custom validators).
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Lucas cotta wrote:in a field that will have a mask for IP address (___.___.___.___)



And what about 192.1.1.252, also a valid IP but it won't fit your input mask
 
Lucas cotta
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Roel De Nijs wrote:
And what about 192.1.1.252, also a valid IP but it won't fit your input mask



I was thinking a field similar to the Windows TCP/IPV4 properties window... do you think is a bad idea?

And another question... an interpretation one..
the instructions say that "The new application, using the existing data file format, must allow the CSRs to generate a list of constractors that match a customer's criteria."
But in the database there are SUBcontractors...

so, what my application will search in the database, contractors or subcontractors?

Thanks!!
 
Roel De Nijs
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Lucas cotta wrote:I was thinking a field similar to the Windows TCP/IPV4 properties window... do you think is a bad idea?


No, that's just fine

Lucas cotta wrote:so, what my application will search in the database, contractors or subcontractors?


I guess you are asking this question because in your instructions both "contractors" and "subcontractors" are used in the text to explain the specification (and/or data file content). I would stick to "contractors"
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic