Using java abstract class

Posted by user969131 on Stack Overflow See other posts from Stack Overflow or by user969131
Published on 2012-06-06T16:29:57Z Indexed on 2012/06/06 16:40 UTC
Read the original article Hit count: 169

Filed under:
|
|

In my UI project, I have few screens that share the same header style only the text is specific to the screens. What will be a good way to implement this?

  1. Have the super class create all the header component and open the components to the sub class, the sub class will access to component's setText method to update the text?

or

  1. Have abstract method in super class to create the components, sub class will implement these methods to create the component.

Hope it make sense..

© Stack Overflow or respective owner

Related posts about java

Related posts about class