This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes I two easy question fix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "I two easy question fix" Watch "I two easy question fix" New topic
Author

I two easy question fix

Mali Fomashila
Greenhorn

Joined: Nov 28, 2001
Posts: 1
I have 2 forms in separate class files. I want hit button on formA and open formB (and closeA to). How?
second. I want for todays date to be displayed in Jtext or Jlabel on form, how do I get date? Do i need format date too?
thanks,
mali
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
For question n�1, what you can to do is to define a Controller class.
This class should be able to listen to the event on ButtonA and ButtonB. In the callback method from ButtonA, open the formB. The pseudocode may look like:

What happens with this code is that when a click on ButtonA is performed, then an ActionEvent is created and the actionPerformed() method of the internal Controller ButtonAListener class is activated. In this method, you should put your code for opening FormB
}
W.
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I two easy question fix
 
Similar Threads
Date Display In MM/dd/yyyy
SimpleDateFormat
How to read and wrire date in RMS
Sorting of vector
Date method