Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Overriding private functions

cheekyianscheekyians Posts: 3Member
I have an abstract class that I want to be able to specify an abstract function, however the functions are ones which are automatically produced in the children and is set to private, the IDE will not let me change this and I cant tell the abstract class to have an abstract private class so is there anyway round this?
The solution could be to not have the function as abstract but then I'm not sure it will use the function of the childrens class as currently the class looks like this:

abstract public class Panels2 extends javax.swing.JPanel {

E ObjectIn;

public Panels2()
{
System.out.println("error");
}

public Panels2(E x)
{
super();
initComponents();
update(x);
}

abstract public void update(E x);
abstract private void initComponents();
}

If I had a definition for the initComponents() function would the Panels2(E x) constructor then use the initComponents() function defined in this class or the one in the child?
Hope someone can help
Ian
Sign In or Register to comment.