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.
I have installed java 7 on my machine. However, when i try to compile any servlet it is not able to locate any of the packages relating to servlets i.e. javax.servlet.* and javax.servlet.http.*.
I surfed the net and found that I need to have jsdk.jar. However, despite rummaging the net for an entire week, I could not find jsdk.jar. I was also directed to a page which says that I should download the servlet development kit, but the links provided in most of the pages on the net are old and redirect me to the oracle sun site, which does not have any such development kit. Now, it has become a nightmare for me to compile even a trifle servlet.
That is why I have incremented rowdeleted to keep track of relative position of a row with respect to the loop after the row is deleted. The logic works pretty fine without that listener. As soon as I attach that listerner it starts giving bizarre result. I have even done that backward loop iteration. It also gives the same result. The problem is somewhere with the listener.
I have a JTable called partTbl with DefaultTableModel. However, I have attached the following listener is attached to it:
The above listener makes sure that whenever a user preses tab and the cell gets focus it automatically comes to the editing mode which was what I wanted.
However, when I try to remove a row this listener interferes with it and un-intended rows get deleted. This I have verified, because when I remove the above
listener, the following code for removing the rows works very well, which along with the listener gives bizarre results:
I am using netbeans and I have written this code in netbeans txtphone focuslost event section. I think so far as over-riding etc. are concerned, netbeans must have handled those issues.
As I have written the code in txtphone focuslost event section, I think it should be invoked only when txtphone field looses focus.
I noticed one more thing. When the message dialog box appears for the first time, and if you drag it, there lies an identical dialog box beneath it and one more beneath it. This makes me to think that three dialog boxes, one below the other, are being opened probably.
Here, if the textfield is left empty, the result string is displayed and txtphone field gains focus. So far so good. But as soon as it gains focus it again automatically comes to this focuslost method thrice. I fail to understand, why this is happenning.