• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to higlight the lower part of a JButton? ?  RSS feed

 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to highlight ONLY the lower part of any Component (such as JButton, JTextField,...).. Thanks.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "the lower part"? The lower half of the component? Or do you mean you want the bottom edge of the button to be highlighted?

If it's the first you're going to either have to override paintComponent() to do this in the components you want or mess with look & feel a lot.

If you want the lower edge highlighted, the easiest way would be to make a new border and just set it on the components you want.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!