This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JButton LookAndFeel customizing  RSS feed

 
emilio rossi
Ranch Hand
Posts: 47
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
i made a GUI wich looks great with WindowsLookAdnFeel on windows 7 , except for jbuttons ,i want them to have a raisedBevelBorder and so i did, but they have a line Border around the text as you can see in the pictures,
http://imageshack.us/photo/my-images/62/jbutton.png/
i tried every available method but anything happened,
is there a way to eliminate it and made them look like jbuttons with WindowsClassicLookAndFeel?

 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing any details of your approach to customizing the JButton, any suggestion could be way off the mark. To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
 
emilio rossi
Ranch Hand
Posts: 47
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not much to say about it, its a simple jbutton, the code is the following


to see the difference i mean you must try this code first and then put "WindowsClassicLookAndFeel"

im trying messing around with the uimanager, but nothing seems to work, unless one would write uimanager.put("ButtonUI",some basic ui) and lose all the button features such as highlightning etc,
wonder what is the key string that identifies that line border in the uimanager to set it false somehow...
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wonder what is the key string that identifies that line border in the uimanager

The line isn't part of the border, it's part of the content area fill. The button's default border, retrieved with UIManager.get("Button.border") is com.sun.java.swing.plaf.windows.XPStyle$XPEmptyBorder
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!