Is it fine for a class that creates objects to delegate them?
I have a large list of intercommunicating components; so I decided to have one class create all of them and then subsequently delegate them to other classes to facilitate finer tweaking and wiring together.
Does having many duplicated methods and deep inheritance hierarchies in GUI APIs (Java Swing, Android SDK) violate the SOLID design principles?
For those unfamiliar with the SOLID principles you can start reading here: Wikipedia article. However, most of my understanding comes from: http://www.objectmentor.com/resources/publishedArticles.html
How to pass control between sub-controller to parent controller in Java MVC Design Pattern?
I’m pretty new in Java, but I’ve done plenty of research and I know what MVC is. However, to implement MVC in Java was a difficult task. I followed this tutorial, which helped me to realise that the event listeners usually embedded as an anonymous class can be segregated into a controller class – which makes it conform to the MVC pattern.
Why ‘JButton’ is-a ‘Container’ in javax.swing?
As per the class hierarchy in java.awt.*
, class Button
& class Label
is-a
class Component
, and Component is not a Container, which make sense to me.
Why ‘JButton’ is-a ‘Container’ in javax.swing?
As per the class hierarchy in java.awt.*
, class Button
& class Label
is-a
class Component
, and Component is not a Container, which make sense to me.
What is the advantage of ‘SwingUtilities.invokeLater()’ method?
For the below sample GUI program using javax.swing,
Adding a graphical view to a system
I currently have an program in Java that simulates railway movements. Essentially, trains arrive on platforms, pick up and drop off passengers, and then proceed, respecting signalling where possible. However, currently this only exists in the program’s state, and there is no actual graphical view of all of this happening.
Adding a graphical view to a system
I currently have an program in Java that simulates railway movements. Essentially, trains arrive on platforms, pick up and drop off passengers, and then proceed, respecting signalling where possible. However, currently this only exists in the program’s state, and there is no actual graphical view of all of this happening.
Adding a graphical view to a system
I currently have an program in Java that simulates railway movements. Essentially, trains arrive on platforms, pick up and drop off passengers, and then proceed, respecting signalling where possible. However, currently this only exists in the program’s state, and there is no actual graphical view of all of this happening.
Architecture for my Java application [closed]
Closed 9 years ago.