• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to make buttons active and non-active

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I don't know what words to use. But on a panel using cardlayout i have added many cards and. On the first card i have a text field and a password field
i have already stored those username and password and when i press the ok button i enters the next card, till here its fine and works good.
Now the actual problem:
I have even added few buttons like next and previous which can be seen on every card using BorderLayout. If i press the next button instead of entering the details and pressing ok the next card is displayed. So i want to deactivate these buttons just on first card how to do that.Please some body help.
 
Marshal
Posts: 80295
434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On things like buttons you can use the setEnabled method. It takes a boolean, true or false. I think they are enabled by default.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic