This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Focus JInternalFrames .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Focus JInternalFrames .." Watch "Focus JInternalFrames .." New topic
Author

Focus JInternalFrames ..

David Hittel
Greenhorn

Joined: May 25, 2007
Posts: 11
Hi everybody,

i have a weird Problem with my application. I Have a JFrame with a DesktopPane and to this Pane i add JinternalFrames like this

BetriebListView BeLi = new BetriebListView();
BeLi.setVisible(true);
desktopPane.add(BeLi);

But the problem is when one JinternalFrame is open and i open another JInternalFrame, the first JIF is always on top and the other JIF is hidden behind the first.

Somebody of you has any suggestions?

Thanks alot

David
David Hittel
Greenhorn

Joined: May 25, 2007
Posts: 11
Hi i solved it myself, typical i tried to solve it for hours then you post you problem and then you find the solution. :-)

Here the code

RohstoffListe RoLi = new RohstoffListe(desktopPane);
desktopPane.add(RoLi);
RoLi.setVisible(true);
RoLi.hasFocus();

Its very important that you call setVisible after you added it to the DesktopPane otherwise the Window will get no Focus.

Bye
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Focus JInternalFrames ..
 
It's not a secret anymore!