Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How can I view the visual components from a class that extends from an abstract class?
How can I view the visual components from a class that extends from an abstract class? [message #503576] Mon, 14 December 2009 13:40
Danilo  is currently offline Danilo
Messages: 9
Registered: September 2009
Junior Member
Hello!

I've created an abstract class that extends from JPanel. If I create any class that extends this first class, that class doesn't show the componentes from the first class.

What can I do for showing the components?

public abstract class AbstractClass extends JPanel {

    private JLabel jLabel = null;

    public AbstractClass() {
        super();
        initialize();
    }

    private void initialize() {
        GridBagConstraints gridBagConstraints = new GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        jLabel = new JLabel();
        jLabel.setText("JLabel");
        this.setSize(300, 200);
        this.setLayout(new GridBagLayout());
        this.add(jLabel, gridBagConstraints);
    }

}


public class A extends AbstractClass {

}


A just shows a blank panel.

[Updated on: Mon, 14 December 2009 08:42]

Report message to a moderator

Previous Topic:[ANN] XWT Designer
Next Topic:How can I view the visual components from a class that extends from an abstract class?
Goto Forum:
  


Current Time: Sun Aug 31 00:28:49 EDT 2014

Powered by FUDForum. Page generated in 0.10381 seconds