• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI design by SUN

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 269
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic