| 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 );
|
|
available on the web at: |
http://mindprod.com/jgloss/jbutton.html |
optional Replicator mirror
|
J:\mindprod\jgloss\jbutton.html | |
![]() |
Please email your
feedback for publication,
letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear
wording, broken/redirected link reports, suggestions to improve this page or comments to
Roedy Green :
| |
| Blog | Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[54.234.67.55] |
|
| Feedback | You are visitor number 51,117. | |