• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Frame and Button problem

 
sabbir kazi
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scenario is:
Frame 'frm' has a button 'btn' on it. When the user clicks on the 'btn', a new frame 'frmB' will be popped out, leaving the 'btn' in 'frm' disabled. When the user close 'frmB', 'btn' will be activated again.
Please help with source code.
Thanks.
 
Michael Fitzmaurice
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at the <code>setEnabled()</code> method of java.awt.Component, which is inherited by java.awt.Button.
You may also want to investigate the <code>setVisisble()</code> and <code>dispose()</code> methods that java.awt.Frame inherits.
Hope this helps
Michael
------------------
"One good thing about music - when it hits, you feel no pain"
Bob Marley
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you even STARTED? Can you create the class to hold this frame at least?
Which part do you not understand. Just having someone WRITE it for you is not a very good learning tool.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic