This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hey, I've written a route finder in Java over the past few weeks that runs from a command prompt by reading in a text file of attractions and then calculating the shortest route between a specified two. the problem is that i'm having REAL trouble trying to design a front-end, indeed i'm not even sure where to start !! my e-mail address is: email@example.com if anyone would be kind enough to e-mail me or send me a pm to get the source code and then help me in some how designing even a basic front end i would be eternally grateful !!! thanks in advance, yours hopefully, Tom Latham
If you tell us what kind of data you want to show/retrieve from the user and/or what you were thinking of, perhaps we could offer some suggestions on how to implement it. You haven't given us enough info to really help you and most people won't email you directly. This is a forum - give us some info so we can help! Brian
i know sorry.... this is getting very frustrating. the data given at command line in the working version are three strings (the filename, start point and destination point) the text file is a list of various vertices on the network in the form of the attraction name, it's neighbour, the edge between them and the distance.... here's some of the code: this is a method in the Swing form that runs after being loaded from a splash screen:
it then runs this method in the main ShortPath program file which is only a part of the whole ShortPath class:
however, when i try to run the program before having entered any data it comes up with an error message saying "Error Reading attractions2.txt" any ideas for this ?? is what i'm trying to achieve even possible ?? thanks in advance [ April 07, 2004: Message edited by: xpealia dogious ]
All that the error message you are getting means is that whatever the method "loader(f)" does has failed...
You need to change your IOException catch block to print out the stack trace of the error to figure out exactly where and exactly what is causing the error... all you need to do is add the line "e.printStackTrace();" inside the IOException catch block. Then you will have some idea of what the actual problem is...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Apr 05, 2004
the error it gives is just the same error as the else clause in the if loop following the code in the ShortPath class given above: the if loop is: if ( findShortestPath( roads, s, d) ) displayPath( roads, s, d ); else System.out.println( "The path does not exist. Please check spelling." ); - any ideas ??