M
Martijn Mulder
Most texts urge me to call super.paintComponent() in the derived class. Is
there a compelling reason for that or can I rely on the proper execution of
the following class hierarchy?
class MyFirstComponent extends javax.swing.JComponent
{
public void paintComponent(java.awt.Graphics a)
{
super.paintComponent(a);
}
}
class MySecondComponent extends MyFirstComponent
{
public void paintComponent(java.awt.Graphics a)
{
// super.paintComponent(a);
// skipping super.paintComponent() here.
// Is that safe?
}
}
there a compelling reason for that or can I rely on the proper execution of
the following class hierarchy?
class MyFirstComponent extends javax.swing.JComponent
{
public void paintComponent(java.awt.Graphics a)
{
super.paintComponent(a);
}
}
class MySecondComponent extends MyFirstComponent
{
public void paintComponent(java.awt.Graphics a)
{
// super.paintComponent(a);
// skipping super.paintComponent() here.
// Is that safe?
}
}