aspose file tools*
The moose likes Beginning Java and the fly likes Order Of JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Order Of JInternalFrame " Watch "Order Of JInternalFrame " New topic
Author

Order Of JInternalFrame

Koh Khai Huat
Ranch Hand

Joined: Aug 05, 2005
Posts: 100
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


if (!WorkHard){
System.out.println("Fail!!!");
}
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I don't know whether this would work, but have you tried setSelected(true)?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

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

Joined: Aug 05, 2005
Posts: 100
Thanks that really slove my problem

thanks for everything.

regards
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

It seems odd that there isn't a method in JDesktopPane to "cascade" or "tile" JInternalFrames...

:roll:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Order Of JInternalFrame