aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes GUI design by SUN Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GUI design by SUN" Watch "GUI design by SUN" New topic
Author

GUI design by SUN

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I was scanning through the Look And Feel Tutorial and GUI design on java.sun.com and came across a few things I did not know. However, one of them seems to not be available.
According to the site:
The JToolBar.isRollover client property is set to true to enable mouse-over borders.
This is suposed to keep the coder from having to implement a mouse listener on the JToolBar buttons to get the rollover border affect.
Probkem is, that method is not in the API. So it doesn't work. Can anyone Verify this for me?

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Actually, I went one step further and used the reflection package to print out all the fields and methods of the JToolBar class and there wasn't anything in there that remotely resembled isRollover... ( at least in Java v.1.4 ) Maybe it was something that they were thinking about adding, but that got cut...

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Thanks Nathan. I guess I'll stick to my mouseOver's.
BTW, have you had any experience using setExtendedState() on your JFrame? I can't seem to get mine to work.

------------------
Happy Coding,
Gregg Bolinger
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
In fact, this property exists but not directly in JToolBar and not for all look-and-feel.
It seems to be taken in account in the MetalToolBarUI:

So once you have instanciated you JToolBar, you can set the client property to true with
toolbar.setClientProperty("JToolBar.isRollOver","true");
W.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GUI design by SUN