internal frame disapears

Hi experts,

My internal frames can be moved around but if moved upward they seem to keep going and part of the internal frame will disappear behing the menu bar or tool bars. How do you restrict an internal frame from going beyond the panel it is placed on? so that the entire internal frame is always veiwable?

thanks
SamooramadAsked:
Who is Participating?
 
objectsCommented:
all components will disappear behind an opaque component that is at a higher z level.
you'd need to look at using layered panes if you want to be changing the z order.

http://java.sun.com/docs/books/tutorial/uiswing/components/rootpane.html
http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html

Another possibility may be to make your components transparent.

0
 
CEHJCommented:
Again, like in one of your earlier questions, that would probably require a custom layout
0
 
SamooramadAuthor Commented:
or at least how do I get it to appear above the menu bar and toolbar?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
CEHJCommented:
That would be still harder to do - it's not meant to do that ;-)
0
 
SamooramadAuthor Commented:
sheesh.. well got any alternative ideas? :)
0
 
JavatmCommented:
Well an internal frame would always be like that except if you can get the mouse location of the area on which you want to limit the access of the frame. If you can get it then thats it you can limit it but it would be hard to do since all internal frames
are ment to be like that which disappears in a certain area.
0
 
SamooramadAuthor Commented:
could you give me an example to base it on Javatm?
0
 
SamooramadAuthor Commented:
maybe by getting the position f the desktop or menubar? could that work?
0
 
CEHJCommented:
You shouldn't really do this sort of thing even if you can. It violates a central principle of gui design - the principle of 'least astonishment'
0
 
SamooramadAuthor Commented:
meaning?
0
 
CEHJCommented:
Meaning that guis should correspond to common expected standards about how their components behave otherwise people would find computers difficult to use as a behavioural anarchy would quickly set in. This compliance is normally quite natural in Java, as the behaviour of Java components is derived from their native peers anyway. It's when that behaviour gets overridden that the problems start
0
 
SamooramadAuthor Commented:
ok. wasnt familiar with that :)
0
 
objectsCommented:
> or at least how do I get it to appear above the menu bar and toolbar?

You can place your gui elements whereever you want.
You just need to use layout managers that will give the desired layout and add your components where needed.
0
 
SamooramadAuthor Commented:
how so objects?
the internal frame keeps dissappearing beneath them
0
 
SamooramadAuthor Commented:
thank you :)
0
 
CEHJCommented:
8-)
0
 
objectsCommented:
(:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.