Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / August 2007

Tip: Looking for answers? Try searching our database.

JSplitPane divider component and JPopupMenu panel

Thread view: 
Karsten Wutzke - 27 Jul 2007 10:15 GMT
Hello!

I have two questions:

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)?

2. Is it possible to restrict how far to move the divider left and
right?

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...

TIA
Karsten
Daniel Pitts - 31 Jul 2007 00:24 GMT
> 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
srefson@gmail.com - 17 Aug 2007 15:42 GMT
> On Jul 27, 2:15 am, Karsten Wutzke <kwut...@web.de> wrote:> Hello!
>
[quoted text clipped - 34 lines]
> > TIA
> > Karsten

Is it really neccessary to be so pompous Mr Pitts?  There will always
be people who either know more than you or know less than you.  Either
group have something to contribute and don't need petty put downs
because you want to feel more important than them just because you
have looked up something on the internet before they did.
Lew - 17 Aug 2007 21:27 GMT
>> On Jul 27, 2:15 am, Karsten Wutzke <kwut...@web.de> wrote:> Hello!
>>
[quoted text clipped - 36 lines]
> because you want to feel more important than them just because you
> have looked up something on the internet before they did.

FWIW, I don't read Daniel Pitt's message the way you do.  Perhaps your
interpretation is unnecessarily harsh.  Maybe you yourself should avoid
personal attacks.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.