Different InternalFrame

hi

i want to add a modified type of internal frame to my dektop pane. i have no problems with internal frames as such but i want to add one that is somewhat different. i don't know what they're called but i'll describe it as best i can.

you've no doubt seen those internal frames that appear to be docked to the desktop pane. they have a much smaller title bar and usually only a close button in the top corner. they behave almost like a JToolBar where you can dock and undock and move only in accordance with certain rules. they may be resized, but usually only in the direction that exposes the desktop pane, ie. if its docked on the left you can only enlarge it to the right. they usually sit on one one side of the enclosing frame. know what i mean?

i know there is a way to do this in java as oracle's jdeveloper 9i program uses them and its written in java. is there any convenience object that i could use to construct this psuedo-internal frame or am i left with constructing a custom component?

any help at all would be greatly appreciated.

thanks heaps...

Takis

[1119 byte] By [takisd] at [2007-9-27 16:21:29]
# 1

Sounds like a custom component to me. It sounds like you could building one subclassing a normal internal frame. You'd have to handle the placement of the internal frame, and add listeners to open and close if the title bar is clicked. I'm not sure how you'd handle one that pulled out from the side of the desktop pane, as opposed to the bottom.

Hmmm, You might have to remove the title bar completely and add your own very thin button on the exposed edge, that would always show whether docked or undocked, your own custom title bar. That way you could add it to any edge of the desktop pane, not just the bottom.

It sounds doable to me, but I think you're going to have to bulid it pretty much from scratch.

I'm not sure you'll get the animated pull out effect either. You'd have to fake it which might be a little slow via Swing's repaint mechanism.

Andrew Wilcox

Andrew

windowe at 2007-7-6 0:39:54 > top of Java-index,Archived Forums,Swing...
# 2

i think you may be right - and what i was afraid of. i've got a couple of ideas in mind including an extension of JInternalFrame as you suggested, or even some sort of resizable JPanel, perhaps even a modified split pane.

a few things to play with i guess..

thanks for your suggestions

Takis

takisd at 2007-7-6 0:39:54 > top of Java-index,Archived Forums,Swing...