aspose file tools*
The moose likes Beginning Java and the fly likes Good design or should I try something else Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Good design or should I try something else" Watch "Good design or should I try something else" New topic
Author

Good design or should I try something else

David Patrzeba
Greenhorn

Joined: Jun 08, 2010
Posts: 14
Is this a good way of creating the window or is there a different design I should try. I like breaking everything up for organization but that means that I need to create all the containers as static variables.




David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It only means that because that's how you've coded it; you could also be returning a menu, or returning menu items, etc.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18909
    
    8

As far as everything having to be static, I would recommend rewriting your code to look like this:

Now that you have an object of the Snippet29 class, you can call its methods (which are the formerly static methods of the class) and use its variables (which are the formerly static variables).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Good design or should I try something else