This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Spark in Action and have Jean-Georges Perrin on-line!
See this thread for details.
Win a copy of Spark in Action this week in the Open Source Projects forum!

Stefan Seeba

+ Follow
since Oct 24, 2000
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 Stefan Seeba

Hi all,
I have to access some JavaScript-functions via LiveConnect on an Apple Macintosh. Therefore I tried to get a window-object by JSObject.getWindow() resp. tried to load the class via Class.forName as you can see in the following code.
What happened was, that the code simply stopped and popped up an empty Java Message-Window. There was no further output after "Trying to get JSObject...".
This happened on the MSIE-Implementations 4.5 and 5.0 on the Mac while there was absolutely no problem at the Windows-platform.
Does anybody know a workaround to access JavaScript from an applet on a Macintosh ?

[This message has been edited by Stefan Seeba (edited May 07, 2001).]
19 years ago
Hi all !
I'm programming an applet that will have to be deployed on browsers from Netscape 4.06 and IE 4 upwards.
Now I'm looking for the simplest way to play sounds in my applet.
I tried the AudioClip-way with some .au-files but not even all .au-files seem to be played, though they were all sampled with 8000Hz.
I think in the near future I will also have to play some .wav or .mp3-sounds. Those sounds will have to be a bit dynamic, ie. the first asks for a file and the second page with the applet plays this file. (So, static sounds with Flash-Movies are not allowed)
Does anybody have an idea for a better way to play sounds ?
Maybe via HTML, Flash or JavaScript-connections ?
Maybe via plug-ins or JMF ?
But the results will have to be deliverable the easy way. That means I can't send 2MB-JMF.jars with my applet.
TNX in advance for any hints,
19 years ago
Hi !
I need to place a small image behind the text of a label. For compatibility reasons I have to work with the normal AWT (no Swing, no JLabel with icon).
My approach was to inherit from Label, edit the paint-method and add an image there.
class ImLabel extends Label {
public void paint(Graphics g){
But the effect is that the image is always in the foreground.
Is there a chance to get the image into the background and the letter(s) on top ?
Best regards,
19 years ago
Hello Haijun
We deal with three different things here:
1) a is a member of Qcb90 and therefore also known in g(...). The a=1 is valid for the whole scope of the class.
2) b=1 in g(...) deals with the method-local-variable in g(...). Therefore the value 1 is lost when the method returns.
3) c is an array and therefore a reference-variable. This reference is given to g(). The g()-method-local c "points" to the same c as the f()-method-local-variable c. Therefore c[0]=1 changes the same memory-position, that is also referenced by the f()-variable c[0].
I hope, this helps,
Best regards from Hamburg,
[This message has been edited by Stefan Seeba (edited October 31, 2000).]
[This message has been edited by Stefan Seeba (edited October 31, 2000).]
Hi all of you !
I just passed my examination this morning in Hamburg with a score of 84%.
Some experiences I made:
- Yes, there were many questions regarding threads and I/O. The distribution was quite similar to those posted in the last few days by others.
- The range between easy and hard question was very wide. There were questions which took me 15 seconds and others with lots of code which took me more than 2 minutes.
- The hardest questions weren't those with lots of code (they were time-consuming but not too hard)
- Be fast! The time that you have at the end to review the marked questions is really valuable as you get some ideas by the later questions and answers. I had about 20 minutes left and that was enough to review all my twenty marked questions.
- Don't expect a quiet room where you sit on your own ! I had three other candidates with me writing on other things. One wall of the exam-room was only half the room length. The remaining was open to the lobby of the company. And from time to time it was quite loud there. (If you are going to take your exam in Hamburg, you may contact me about that! )
- Though it's an excellent book, reading RHE (and practicing the tests) is not enough. Practice as many mock's as you can and try to find those with lots of code, with I/O and threads. But don't neglect the basics like overriding, overloading and variable initialization. And code,code,code... it's time-consuming but efficient. You remember things much better.
- The evening before you take your exam, try the roundup-game here at this site. It's funny and not too hard. So it gives you the right self-confidence to have a good night before you take your exam.

Thanks, you all for discussing very valuable questions and give me the right information about the exam.
Thanks Javaranch - just the site I needed.
Now, let's see what the local companies say to my applications. If they care about SCJP at all.
Best regards,
It's party time...

[This message has been edited by Stefan Seeba (edited October 26, 2000).]