This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

kwwong wong

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

Recent posts by kwwong wong

Thanks Merrill Higginson. I use the <html:cancel> and it works. Thanks
16 years ago
I am currently develop an application using JSF with WSAD 5.1.2. I have a page with tabbedPanel component with three tabs. When I click to the last tab and update the data. After click the submit button, the screen is refresh and display the first tab again. However, I want to display the last updated tab rather than the first page. How to control the active tab other than the first tab. Thanks
[ September 23, 2004: Message edited by: kwwong wong ]
17 years ago
I have a web page which can detect the JRE version in the user's browser. If the user has not installed the JRE, it will auto-install the JRE with auto-download the JVM installer from sun web-site. However, after downloading the package, it start the installer with error.
The error message from Windows Installer is :
This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
Why & How to solved?
18 years ago
I using JBuilder to pack the application in executable jar file. When run the program, it through the following errors on JMenuBar, JMenu, JPasswordField and JButton:
UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JMenuBar[,0,0,0x0,invalid,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,margin=,paintBorder=true]
java.lang.Error
at javax.swing.UIDefaults.getUIError(Unknown Source)
at javax.swing.UIDefaults.getUI(Unknown Source)
at javax.swing.UIManager.getUI(Unknown Source)
at javax.swing.JMenuBar.updateUI(Unknown Source)
at javax.swing.JMenuBar.<init>(Unknown Source)
at team6.inv.gui.MainFrame.<init>(MainFrame.java:19)
at team6.inv.gui.MainApplication.<init>(MainApplication.java:24)
at team6.inv.gui.MainApplication.main(MainApplication.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
UIDefaults.getUI() failed: no ComponentUI class for: javax.swing.JMenu[,0,0,0x0,invalid,alignmentX=null,alignmentY=null,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=null,paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=]
java.lang.Error
at javax.swing.UIDefaults.getUIError(Unknown Source)
at javax.swing.UIDefaults.getUI(Unknown Source)
What is the problem ?
18 years ago
I follow the Sun example on the table sorting. When I update the sorted table, the rows in the Jtable become the un-sorted state. How to solved ?
When I use the setValueAt("object",row, col) to set the sorted table cell, it table will come back to un-sorted status and set the row, col on the un-sorted table!!
18 years ago
I have a problem on record locking using JDBC. My application have a JTable to show the records of the table in Oracle DB. User can select the row in the table and the form is shown to display the detail of the record. Before the form is display, I am using the statement SELECT * FROM TABLE_NAME WHERE ID = ? FOR UPDATE NOWAIT to lock the record. The problem is when one user lock the record, another user also cannot lock other record. It seen that the whole table is locked by the first user. Why ? In my knownledg, the select for update statement only lock the selected record. Other rows can be update by other people.
Have any suggestion? Thanks
I am using WIN2000 server platform to develope the program. When I deploy my applicaton to WIN98, the appearance of GUI is different from the WIN2000. The JTextField is very narrow on the screen when running on WIN98. It is normal on WIN2000 server. What wrong ?
My J2SDK version is 1.4.1_01. Layout Manager is GridBagLayout.
My server GUI has a text field for setting the location of the data file and the text field for setting the port number. So when user start the application, the screen is shown with the default(or previous setup) database location and port number. The user can set this attribute before start the server. Thanks
I found that the setValueAt is not trigger in JTable if I have not made the cursor leaving from current editing cell to another cell in JTable. So I cannot retrieve the new owner when I click the book button if the cursor is on the record's "owner" cell.
I have followed Mark Spritzler and it works fine. Thanks.
How to get the new value from the cell of the JTable ?
When I editing the cell in JTable, i.e. change the owner field, and then click the "book" button to save the record, it cannot retrieve the new value of the owner. When I use the getValueAt method it gives me the old value! It seems that the JTable do not trigger the setValueAt method.
However, when I left the row I am editing to another row (at this time the JTable trigger the setValueAt method) and then reselect the editing row. At this time, when I click the "book" button, the new value is saved to the database.
How to solve this problem ?
My program currently padding the null value. I will change it to padding with spaces so that make it consistent with the exist records. Thanks Gareth.
It seems that it is no clear way to stop the server except exit the application. So that my GUI in server has only two button, one is Start, another is Quit. It also provide the user to change the location of the data file.
I am developing GUI for database server currently. I want that my GUI has Start button and stop button on it. So that when user click the start button, it will registy the port as follow :
java.rmi.registry.LocateRegistry.createRegistry(Integer.parseInt(portNum.getText()));
//make a database instance
db = new DatabaseImpl(databaseName);
//register
Naming.rebind("DBMediator", db);
When the user click the stop button, how to delete the rmi regristry port number ?
If I only unbind the service,
//make a database instance
db = null;
//register
Naming.unbind("DBMediator");
when I click the start button again, it give me the follow error.
C:\kwwong>java suncertify.remote.ServerRunner
Jul 23, 2003 6:42:41 PM suncertify.remote.ServerWindow$3 actionPerformed
SEVERE: java.rmi.server.ExportException: internal error: ObjID already in use
Hi Andrew,
Thanks. The problem of read/store properties is solved. The following line is stored in suncertity.properties.
databaseLocation=C\:\\kwwong\\db-1x3.db
If I summit the assignment with this properties file, the examiner will update the filepath for data file, is it O.K. ?
Should I handle the path-separator on Win/Unix system ? Or let the user set the databaseLocation on the first time the application running ?
Thanks
How to store the configuration information in the suncertify.properties. Is it use the Properties class ? If yes, how to specify the properties file is suncertify.properties and location at current directory when create Properties Object? Is it use getProperty/setPropertyto read/store the properties ?
Thanks.