aspose file tools*
The moose likes Beginning Java and the fly likes Frame and Button problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Frame and Button problem" Watch "Frame and Button problem" New topic
Author

Frame and Button problem

sabbir kazi
Ranch Hand

Joined: Feb 03, 2001
Posts: 62
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

Joined: Aug 22, 2001
Posts: 168
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


"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
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.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Frame and Button problem