Solved

Java application a float on top of an application written in another language

Posted on 1998-07-19
6
174 Views
Last Modified: 2010-04-16
JDK 1.1.4
Windows NT Client 4.0

  I have an smalltalk application that takes up the entire screen and a java toolbar application.

  I want the java toolbar application or java application to stay a float on top of the smalltalk application
without taking focus from the smalltalk application.

  How do I do this?

thanks
Anthony
0
Comment
Question by:ajam
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:mjenkins
ID: 1227081
AT the current time, there is no way to do what you request in Java. Keeping on application "always-on-top" is a function of the application's interaction with the desktop (root window). The JDK has very poor support for this kind of interaction. I'm sorry.
0
 

Author Comment

by:ajam
ID: 1227082
How could I use the "C" language with Java using JNI?
0
 
LVL 3

Expert Comment

by:mjenkins
ID: 1227083
The JNI is fairly straight forward, but how to do what you request is dependent upon the platform on which you are deploying. Please be specific.
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:ajam
ID: 1227084
OS/2 Warp 3.0 and NT 4.0 are the platforms
0
 
LVL 3

Expert Comment

by:mjenkins
ID: 1227085
Sorry again. It's been too many years since I've looked at OS/2 and NT is not my thing. I'm sure someone in one of those forums can give you the appropriate native code and then you can wrap it up in JNI.
0
 
LVL 8

Accepted Solution

by:
diakov earned 200 total points
ID: 1227086
About he JNI go to:
http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html
Making already existing window always on top is almost imposible. You have to specify this upon creation in the windows structures.
But you can export the window and GUI code to an external C++ shared .dll, written in MSVC, for example. And you can load it, show it, hide it, update it from your java application through JNI. Your java application will contain the logic, and only the interface will be C++.

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
printing a file in reverse order is easy in recursion rather than in iteration 3 56
mockito example issue 8 72
Way to decrease size of apk file 9 65
hibernate jars 4 26
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now