Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!


+ Follow
since Jan 14, 2002
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by AutinHorse

In the "Marking" part on my assignement document, they said they will give score for server error handling, but I can not find any thing special for server to do the error handling. I only catch all the IO or DB exception, new RemoteException and throw them out. In the client side, I catch all exception, for all the exception, I show a message box and then System.exit().
Is it OK or I need do something more?
Thank for any suggestion.
I define a 'DataAccess' interfce first,then use a local data access class and another RMI interface implements or extends it. In the 'main' method, choose to use local or RMI according to arguments, then cast it to DataAccess, then use it as parameter to initial GUI. GUI use JFrame and some JOptionPane to show message to user.
Now no problem for use the local data class, but when I use the RMI, the Frame window has a column at the bottom of the window, show 'Java applet window', all the JOptionPanes be shown by 'showConfirmDialog' are same, and all the JOptionPanes be shown by 'showMessageDialog' dispear.
The only different are four lines on the main method, to choose local or RMI, but why the windows be different.
The code are as follow (I delete the try-catch block):
public static void main( String[] args ) {
static void local() {
DataAccess data = new LocalData();
ClientGUI tm = new ClientGUI ( data );;
static void remote() {
System.setSecurityManager( new RMISecurityManager() );
String url = "rmi://localhost:1099/";
ServerData c1 = (ServerData) Naming.lookup( url + "DataServer" );
DataAccess data = (DataAccess) c1;
ClientGUI tm = new ClientGUI ( data );;
I want to use special argument prefix to distinguish the different argument, such as for client application:
Client -SVRservername -POportnumber ...
to connect Remote server
Client -DBdbfile
to use local DB.
Is is OK for application or is there some better way to implement it?
I am a fresher of Java GUI, now I met a problem of GUI.
Have you done some treatment for your window because user can change the size of it. My labels and combobox size will change together with the window, this is because I use gridbogLayout, I think all Java program using layout will meet this problem, but I have never seen some program's GUI as this. I only know the null layout can avoid it, but I am afraid of that this is not good because layout is a feature of Java. How can you reserve this problem? Or all the java program can act as this way because we use layout, is this OK?
Thank you!
[ January 30, 2002: Message edited by: AutinHorse ]
I begin the work for assignment. But I am little afraid about the DB file.
In the assignment, the columns are as "No", "Ori", "Des", "Car" and so on, need I take care the sequence of them? I mean, when the sun do test, they will use the same structure DB file or maybe change sequence of columns?
I think I need not treat it, and my program can treat only this DB file is OK, but I am little afraid of it.
Could some friends give me suggestion of it?