Liwuen Chew

Greenhorn
+ Follow
since Mar 11, 2010
Merit badge: grant badges
For More
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 Liwuen Chew

Greetings!
Hope someone can help me with this. I'm running a JS function which uses the navigator.userAgent string to get the browser's main information (Among this there is the browser version).
My problem is that, for some reason, navigator.userAgent return version 7 as the actual version when the script is run in IE9. Tried with different browsers and all of them work fine, is just IE the one that is having detection issues.
Can you please help me onto getting the reason why it detects wrongly the IE version? Thanks in advance!
Thank you for your response. That resolves my concern.
Thank you so much!
Greetings! I have a simple question.
Reading some functions around the Internet, I found that there are some functions that have a return statement "return true;" (or "return false;") and there are others that have "return [true];" (or "return [false];"). Is there any difference between "return true;" and "return [true];"?

Thank you so much for making this clear! Thanks!
Daahh!! It was not a java problem, but an Eclipse problem.
It had some problems rebuilding the project. Checked in the Eclipse's properties, rebuilded and it changed.
12 years ago
Greetings!

Recently I created a webservice (eclipse + jboss) and deployed it using ant. It works great, without problems.
The thing is that I need to create a second one with several modifications, and I need to change the targetNameSpace. I already did that on the @WebService annotation, but when I deploy this new one I always get the older targetNameSpace in the wsdl! I checked and the .class files in my bin folder are not being recreated, I don't know why.
Could you please help me onto changing properly the targetNameSpace? As far as I know, I need to change the urn at the @WebService annotation, but I think I need to do something else, don't know why.

Thanks in advance!
12 years ago
Hi!
Recently I made an swt application with an styledtext inside of it. I use the styledtext.setText() method to make the styledText to display a lot of lines. The problem is that the styledText keeps showing the beginning of the list of lines, and it does not scroll down until the last character.
Is there a way to make it scroll down after using the setText method? Thanks!
13 years ago
Hey that was easy!
Only made a thread and make your SWT application to implement Runnable and that's it!

It would be something like

a) In the SWT form:


b) When you call it:


With these two items, you can use both the SWT and swing forms at the same time!

Hope this helps everyone with the same issue!
13 years ago
Hi everyone!
Right now I'm facing with a "swing freeze" problem. I have two forms, one made using swing and the second using SWT. If I call the SWT one from the swing one, everything in the swing one freeze until the SWT form is closed.
Well, I have a Jmenu which lets me access to the SWT form. If I click the option, the menu freeze still open (and the whole form also freeze) and the SWT form is open. If I close the SWT one, everything comes back again to normal in the swing world.

I have something like this in the swing window


which opens the SWT form. Am I doing something wrong? Thanks!
13 years ago
Hey it worked!
Because it was a jFrame that was converted to a jInternalFrame, there was this line of code

I removed it and it worked just fine!
Thanks!
13 years ago
Hi! I made a jFrame class, but after I made it I converted it into a jInternalFrame class (Deleted the main and extended to jInternalFrame instead of jFrame).
lso I added the code


to my new jInternalFrame. When I add it to a jDesktopPane, the internal frame appears just fine with the minimize, maximize and close buttons at the top.

My problem is that only the minimize and maximize work, but if I do click the close button, it does not close the little window. Can anybody help me please? Thanks!
13 years ago
Hi! I have a SWT button in a SWT form, which has its listener for a click event.
I want to call that listener from a swing jButton. Can you please help me? Thanks!
13 years ago
Greetings! Happy new year to all of you people!
I have a question, perhaps someone can help me.
I have made an application window in SWT , but I need to display it as a JInternalFrame inside a swing application.
Is it there a way to post some kind of panel inside a JInternalFrame which interprets the SWT window, or something like that?

Thank you very much for your help!
13 years ago
Hi everyone! Right now I'm facing a new problem and don't know what to do...

I'm using Jboss with Hibernate (EJB3), and now I'm facing to the need of carrying a global variable for all the times the web service is consumed; I think it is called a "session variable".
What I need is that, when Jboss starts and deploys my ear, It needs to take a value from the database and keep this value as long as Jboss is up.
My main concern is that I don't know how to set up a session variable. I already tried with the @in and @out comments, but I think I might be doing something wrong.

Can you guys please show me how to set up a session variable properly? Thank you very much for all your help!

Thanks!
13 years ago
Hello everyone! I hope someone can help me!

I'm working in an application which needs to read a txt file over the network (is an application running in a client and the file is in a server). I noticed that, when I'm having network problems, the application hangs and I get the gray window.
Checking about this I found that the problem was because of a FileReader that was looking for the file while disconnected from the network. Is there any way to set up de FileReader's timeout, so it lasts no more than 4 seconds?

Thank you so much!
13 years ago
Hey! That works!
Thanks!
13 years ago