Title: How to make "pulldowns" and "popups" overlap a containers border?
Hi Greg,
Thanks for the response, I hope you don't mind a more detailed response.
How would changing the "look and feel" of a JComboBox help place a JTree in
the pulldown?
I would LOVE to reuse, but it seems to me that a new component is the only
way to go.
I am extending JComboBox, but only because I want ((JComboTree isinstance
JComboBox) == true). I have not figured out any way to replace the list of the
JComboBox with a JTree.
So I'm creating a new component. You say "create a new component with a
LF based on that of a combo box". Do you mean that I should not extend
JComboBox, but instead extend ComboBoxUI? Interesting, That may make more
since
So now I'm looking at ComboBoxUI, BasicComboBoxUI, and MetalComboBoxUI. But
this leads me back to the same implementation questions, namely how to duplicate
the observed behavior of Swing combo boxes and menus, where the list has the
ability to descend beyond the JFrame's border.
I'm interpreting your last two comments to mean that a JWindow is implemented
as a native peer, and will give the appearance of a pulldown extending beyond
the "parent" windows borders. Is this what you meant?
Thanks!
-Original Message-From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Greg
MuntSent: Friday, February 08, 2002 4:19 AMTo: Charles
Hymes; [EMAIL PROTECTED]Subject: Re: How to make "pulldowns"
and "popups" overlap a containers border?
You will need to look at changing the LF of a combo
box, I'd imagine. Or create a new component with a LF based on that of a
combo box. Why duplicate behaviour? Reuse it, where possible.
If the popup extends beyond the window frame, a component
with a native peer is used.
If by "frame" you mean the window borders and title bar, use
a JWindow instead of a JDialog.
- Original Message -
From:
Charles Hymes
To: '[EMAIL PROTECTED]'
Sent: Thursday, February 07, 2002 7:26
PM
Subject: How to make "pulldowns" and
"popups" overlap a containers border?
Hi folks, I'm creating a
TreeCombobox, when activated, the pulldown contains a JTree instead of a
list. I was going to implement the pulldown as a
JPanel, and place it in the JLayeredPane.POPUP_LAYER but I discovered that
the panel is truncated at the window's borders.
Real Swing components that use popups, such as JMenus and
JCombox, extend beyond any window's border. What is the best way to
duplicate this behavior?
I figure that there is no way to remove the "frame" from a
JDialog, is that true?
Charlweed