Composition of elements

Swing Designer allows you to quickly create the frames, panels, dialogs, applets and other UI elements that comprise Java Swing applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Composition of elements

Postby michal1101 » Sun Oct 11, 2009 10:31 am


If I have classes as follow:

class BasePanel extends JPanel{
private JLabel = new JLabel("Label");

public BasePanel (){
setLayout(new SpringLayout());

class MainPanel {
BasePanel basePanel1;

(Note: Of course it is only partial code...)

If I look at the desiner editor of the MainPanel I don't see that the basePanel class, that it contains, as it should be. For example, If I look at the Layout it is FlowLayout (instead of Spring). Also, the label is not shown.

What do I do worng?

Thanks a lot
Posts: 1
Joined: Sun Oct 11, 2009 10:20 am

Re: Composition of elements

Postby Eric Clayberg » Sun Oct 11, 2009 2:19 pm

michal1101 wrote:Note: Of course it is only partial code

Indeed, it is "partial code" that does not actually do anything so it doesn't illustrate any particular problem.

If you would like help, please don't leave us guessing as to what you are trying to do.

Post a complete example that demonstrates the problem you are having.
Eric Clayberg
Software Engineering Manager

Author: "Eclipse Plug-ins"
Eric Clayberg
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Return to Swing Designer

Who is online

Users browsing this forum: No registered users and 1 guest