Re: JSplitPane divider component and JPopupMenu panel



On Jul 27, 2:15 am, Karsten Wutzke <kwut...@xxxxxx> wrote:
Hello!

I have two questions:
I count three, but thats okay...

1. Is it possible to use the JSplitPane's divider as a divider between
components with custom behavior (or doing nothing, not movable, or at
least only into one direction)?
Do you mean custom JComponents in the JSplitPane? Yes that is
possible.

2. Is it possible to restrict how far to move the divider left and
right?
If you bothered to read <http://java.sun.com/j2se/1.4.2/docs/api/javax/
swing/JSplitPane.html>, you might have noticed the
setMaximumDividerLocation and setMinimumDividerLocation methods that
do exactly that.


3. JPopupMenu's use JMenuItem subclasses to add their items, how do I
make a JPopupMenu use a GridLayout panel with JButtons instead? It
very much looks like the ICQ/MSN smiley popup...
JPopupMenus "want" to use the look and feel menu style, and I would
suggest you let it. If you want to use the look and feel of your
system, you can add the following snippet to your main method:

try {

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
// Look and Feel exceptions aren't fatal
}



TIA
Karsten



.