Win a copy of Head First Android this week in the Android forum!

Jarosław Piotrowski

Greenhorn
+ Follow
since Jul 22, 2009
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 Jarosław Piotrowski

Hi.

I'm trying to do some array operation with JNI. I want the native code to do produce some array content and update it to java array, but I want it to obtain copy once, and only update content later multiple times.

So I did it this way i c:
http://dev.keraj.net/jni/jni_Shit.c

and Java code looks like:

(of course library is already loaded at this point)

and I get FATAL ERROR (ACCESS VIOLATION) in Java_jni_Shit_commit
althrough if I call Java_jni_Shit_commit inside native Java_jni_Shit_init then it works.
So, I think I've missed something... why I can't just do release in another JNI call?
11 years ago
Ok, i did it like this:
Every JInternalFrame has custom glasspane on it. this glass pane captures every mouse event and redispatch for component which is under the point of event (x,y) - if current component is different than last, additionaly mouseexit and mouseenter events are called.

If anyone wants to know more, ask here or e-mail me.
11 years ago
Hi there...
Im having a problem, let me explain it by example:

I have some JInternalFrames on JLayeredPane... and i want every of them to go to front when selected. The problem is, that if my JInternalFrame has any focusable component in it and user clicks on that component, JInternalFrame loses focus and is not getteing focus events any more - even if i click on its bar. I tried also listening for mouse events, but it also doesnt notify my JInternalFrame when inner component is clicked.

So is there any way I can know about any mouse/focus event on anything in my JInternalFrame or I have to add focus/mouse listeners to every component in it?
11 years ago
I want option "A".
Seems like i must code some native c++ code... pity
First... I've search'd for this on google and didn't find any good answer.
Then I've searched for it on this forum... but, i only found only a thread-question about it with only one answer
"Please do not cross-post the same question in multiple forums" etc. and topic is closed.

So, I cannot find it by using search feature on this forum, and the guy in that topic suggests that this question was made earlier.
If teh answer for my question exists on this forum, then it needs better tags to find it - I just couldn't. Typing anything related to this I got no results, or got too many not related to my question.
That is the reason why i am re-posting this question - I couldn't find and it is hard (if it is even possible) to find an anserwer to my question by using search..

How I can get/list all IP addresses of machines I am connection to via LAN - Can I even do that with Java? or if not, how can I do it with native C++ on linux,mac and windows (i am not a c++ programmer, so i would need a complete examples)
I'd rather prefer a non-native solution.