[SOLVED] Disabling Inherited Methods
Hi there all.
Is it possible to disable methods inherited from a superclass? I have a class that extends JTabbedPane, and I want to prevent other classes from seeing the addTab methods, while using them in my own addTab method. Here is the class so far:
Code:
private class AssociatedJTabbedPane extends JTabbedPane{
private static final long serialVersionUID = 1L;
private ArrayList<Inventory> associated = new ArrayList<Inventory>();
//Prevent other classes from seeing the addTab methods from JTabbedPane, but
//allow them to use this one.
public void addTab(String message, JPanel add, Inventory associated){
addTab(message, add);
this.associated.add(associated);
}
}
Note: This is a nested class.