JSplitpanes + divider

O

onetitfemme

could the arrows in teh divider be grayed out when they come to their
resizable end? and how
..
THanks
onetitfemme
 
D

danharrisandrews

onetitfemme said:
could the arrows in teh divider be grayed out when they come to their
resizable end? and how

The answer is no. A better answer would be not if do not want to write
your own version of a SplitPaneDividerUI and a SplitPaneUI. For fun you
can actually get at the one touch expandable buttons (see code below)
and disable them, however, the BasicSplitPaneDividerUI paints the
arrows black and does not show them as a grayed out.

private void findSplitPaneDividerButtons(Container container) {
for (Component comp : container.getComponents()) {
if( comp instanceof Container ){
findSplitPaneDividerButtons((Container)comp);
}
if (comp.getClass().getName().startsWith(
"javax.swing.plaf.basic.BasicSplitPaneDivider$")){
// Note: Divider button never looks disabled.
comp.setEnabled(false);
}
}
}

Cheers,

Dan Andrews

- - - - - - - - - - - - - - - - - - - - - - - -
Ansir Development Limited www.ansir.ca
- - - - - - - - - - - - - - - - - - - - - - - -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top