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

Order Of JInternalFrame

 
Koh Khai Huat
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I got a problem which i need suggestion to slove it.

this problem is like this, i have a JDesktopPane and Have a few menu on the MenuBar. When i click of new Frame on the menu Bar the program will create a new JInternalFrame. So each time i create a new JInternalFrame the New frame is always behind the old frame!!

I would like to ask for suggestion to overcome this problem all suggestion is well come thanks in advance
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know whether this would work, but have you tried setSelected(true)?
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forget my previous suggestion of setSelected(true). It doesn't seem to do what I expected.

You can use setLocation(int, int) to position the JInternalFrames so that one is not directly on top of the other, and/or...

Use moveToFront() or moveToBack() after you've added the JInternalFrame to the JDesktopPane.
 
Koh Khai Huat
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks that really slove my problem

thanks for everything.

regards
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems odd that there isn't a method in JDesktopPane to "cascade" or "tile" JInternalFrames...

:roll:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic