File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Focus JInternalFrames ..

 
David Hittel
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic