| Introduction | Simulating a Button Click |
| Creating and Configuring a JButton | Gotchas |
| JButton.setActionCommand | Learning More |
| Hitting Enter | Links |
| Focus Box |
Even when you use a round button image, it still lives on a rectangular transparent background. This means if the user clicks in the transparent corners, it still counts as clicking the button. It also counts for the rollover button highlighting.
If you did a setLayout ( null ); you could absolutely position your buttons so they overlapped slightly in the transparent corners. This would let you pack the buttons more closely than the surrounding rectangles would naturally allow.
theButton.setFocusPainted( false );
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.61] | The information on this page is for non-military use only. | ||
| You are visitor number 23,827. | Military use includes use by defence contractors. | ||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/jbutton.html | J:\mindprod\jgloss\jbutton.html | ||