aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes OOP Modeling - Separate GUI from implementaion-How to refer to class where have more than one method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "OOP Modeling - Separate GUI from implementaion-How to refer to class where have more than one method" Watch "OOP Modeling - Separate GUI from implementaion-How to refer to class where have more than one method" New topic
Author

OOP Modeling - Separate GUI from implementaion-How to refer to class where have more than one method

Nicol Green
Ranch Hand

Joined: Jan 30, 2010
Posts: 66
Hi!

I have a problem with class modeling (again ) I have a class where GUI is implemented. On encryption button I want to do playfair encryption and for example Vigenere encryption. I have a separate Playfair class (contains from a few methods), but how do I implement it on the button action event ?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Could you edit your subject line to more accurately represent your question? Explaining your question or remark briefly on the subject line allows us to know what we are getting into, and if we will be able to help.

You can edit your post by using the button.
Nicol Green
Ranch Hand

Joined: Jan 30, 2010
Posts: 66
Sorry..
I hope that now title is better named.
Thanks for a tip.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18114
    
    8

You put the code into the actionPerformed(ActionEvent) method of your listener. I'm not sure why it makes a difference how many methods some class makes, so maybe you could clarify your question, if that wasn't the answer to it.
Nicol Green
Ranch Hand

Joined: Jan 30, 2010
Posts: 66
I have class with GUI implemented and there I have a 3 text area (for plainText, for keyword and for cipherText)encryption button.
I would like to implement Playfair and Vigenere cipher on on click event.
But Playfair and Vigenere are separated classes, with a few methods.
How do I do that connection between them ? Classes follows:





 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OOP Modeling - Separate GUI from implementaion-How to refer to class where have more than one method
 
Similar Threads
Class relations mess - OOP
OO class design
A question about GUI
Passing updated data back to a Main GUI and listening to button clicks
java import packages question