Changing the Label of a JButton Component

See also Creating a Multiline Label for a JButton Component.
// To create a button, see Creating a JButton Component // Change the label button.setText("New Label"); // Remove the label; this is useful for a button with only an icon button.setText(null);

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.