Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Order Of JInternalFrame

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know whether this would work, but have you tried setSelected(true)?
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks that really slove my problem

thanks for everything.

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

:roll:
 
reply
    Bookmark Topic Watch Topic
  • New Topic