-
Separate Swing code from Real code?
Is there an easy way to separate the swing-related stuff from the real code of a program? Like if you have a program that is Swing based, but want the functionality to run as part of another project or to run in a console instead, is there any way of ripping out the Swing stuff?
-
you will have to use the classical mvc design pattern, where you seperate you model (the core logic with the data) from the swing classes which use it.
-
And put them in different packages - that way you can use a build tool to include/exclude classes easily.
And Unit test - that way you can prove you have good separation.
-
Thanks guys, but I meant if you already had the source code to an existing program based in swing and wanted just the functionality out of it. But it's ok, I ended up doing it the hardway 
Cheers.
-
If it's tied in with swing components that much, you have no choice but to extract the functions and rebuild a more modular design.
Similar Threads
-
By Chaitanya Marvici in forum ASP.NET
Replies: 6
Last Post: 07-21-2003, 09:15 AM
-
By Mike Mitchell in forum .NET
Replies: 60
Last Post: 09-13-2002, 05:41 PM
-
By Steven Bell in forum .NET
Replies: 260
Last Post: 06-01-2001, 04:32 PM
-
Replies: 90
Last Post: 04-17-2001, 12:45 AM
-
By michael s in forum XML
Replies: 0
Last Post: 04-03-2001, 04:32 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks