Java Swing - How to make the JButton's boundaries invisible? -


In the screenshot below, you can see four buttons in the selected area. I want to duplicate this type of button in my GUI application. Each of these buttons has an image (play, stop, forward, rewind). I can use the icon's icon property to add to the image.

When the user catches the mouse pointer on a button, then there are three things:

  1. It varies color - I do not need this feature.
  2. This tool shows tips I know how to do this by using the tooltip text property of a button.
  3. Most importantly, These buttons do not have the border around them, their limitations are not visible at all. This is the image that is visible. I want to do something like that. But when I add an image to a button, its range does not go away (I mean that these boundaries are clearly visible in the form of a line - as you can see in the second image)

Then limit the limits of what a button's property should I manipulate, or what method should be used (and on this Except the existing image, marks of every view of the button) invisible?

Enter image details here

< Img src = "https://i.stack.imgur.com/SnXEC.png" alt = "Enter image details here">

A border is painted when set to true, otherwise:

setBorderPainted : < / P>

set border painted property. If there is a limit of true and buttons, then the border is painted. The default value for property is true . Looking at something and feel that it can not support the border-painted property, in which case they ignore it.

Note that some glance and experience can ignore this property.

Update:

The default and experience is called CrossPlatformLookAndFeel . It does not have a look and feel, but is an indicator of the default. The default that depends on the platform that you are using. Look for the details I was personally using Loka, but I had to face some problems with it. I'm not sure if it respects setBorderPainted , but I would not be surprised that it is not.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -