• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Altering JButtons

Is there any way to enable or disable a JButton so that a user can or cannot press it under certain conditions that the program will decide ?  Also is there any way to change the text on the JButton while the program is running ?

I will be grateful for all help offered regarding this.

John
0
johnclarke
Asked:
johnclarke
1 Solution
 
expertmbCommented:
hi,

  u can do it use the property

 setEnabled(true);
 setEnabled(false);

for text use setText("label");

mb...
 
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now