• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is good design for my Swing app?

Volodymyr Lysenko
Ranch Hand
Posts: 512
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Probably my Swing application has very bad architecture or design.
Can anybody suggest me good design style to use to build my Swing application?

The problem is :
I have main JFrame. It has reference to MouseListener which is top level another class.
This MouseListener has reference to another ActionListener which is also separate top level class.
This ActionListener has reference to my own implementation of JDialog. It is also top level class
This JDialog implementation has reference to ConnectionManager.

I need reference of ConnectionManager(which is in JDialog impl. ) in my main JFrame.
I can create getters to every reference and then access needed ConnectionManager.

But I am afraid my the whole design is wrong because I do not have decent experience in coding on Java Swing.
That's why I ask how to redesign my Swing app to have everything built according to some patterns.

What is good architecture(or patterns) for my Swing app which is Database Viewer(like Navicat or MySql workbench).

Thank you!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic