 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Per Skjondal Guest
|
Posted: Thu Dec 08, 2005 3:01 pm Post subject: Designer failes to create contentPane |
|
|
Hi all.
I have just installed JBuilder 2006 and after building up a screen of togglebuttons, panes and labelsusing the designer and replaced the buttons with my custom made ones (and yes, I have a default constructor on all), the designer suddenly desides not to show the layout properly. There is a message saying: "Failed to create live visual subcomponent contentPane (GridBagLayout) as JPanel contentPane;. Creating using default constructor javax.swing.JPanel
"
The result is a partly shown contentpane with the buttons, but no labels.
I even tried remove all my custom buttons, but that did not help. Somewhere along the way, the code got messed up, but I can't figure it why and where.
The program runs properly though...
Anyone had this problem?
Regards
Per Skjondal
Developer, Norway
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Fri Dec 09, 2005 2:04 am Post subject: Re: Designer failes to create contentPane |
|
|
Per Skjondal wrote:
| Quote: | I have just installed JBuilder 2006 and after building up a screen of togglebuttons, panes and labelsusing the designer and replaced the buttons with my custom made ones (and yes, I have a default constructor on all), the designer suddenly desides not to show the layout properly. There is a message saying: "Failed to create live visual subcomponent contentPane (GridBagLayout) as JPanel contentPane;. Creating using default constructor javax.swing.JPanel
"
The result is a partly shown contentpane with the buttons, but no labels.
I even tried remove all my custom buttons, but that did not help. Somewhere along the way, the code got messed up, but I can't figure it why and where.
The program runs properly though...
Anyone had this problem?
|
Go to "Tools | Event Log", see if there's any exception there that might explain the problem. It's possible one of your components isn't behaving nicely in the designer.
If that is the case, consider wrapping the offending code with:
if (!java.beans.Beans.isDesignTime()) {
....
}
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Kevin Dean [TeamB] Guest
|
Posted: Fri Dec 09, 2005 12:13 pm Post subject: Re: Designer failes to create contentPane |
|
|
Per Skjondal wrote:
| Quote: | Thats whats so weird. There are no messages in the eventlog that
correspond to this behaviour, and I did try to remove my custom buttons
and replaced them with the original ones, but the same thing happen.
I had a similar problem after upgrading from JBuilder X to JBuilder 2005
and I was forced (and still is) to open my form using JBuilder X!
|
Try running JBuilder.exe rather than JBuilderW.exe. Hopefully you'll see
a stack trace in the console window that will give you some clue as to the
source of the problem.
--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/
NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html
Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Per Skjondal Guest
|
Posted: Fri Dec 09, 2005 12:37 pm Post subject: Re: Designer failes to create contentPane |
|
|
Thats whats so weird. There are no messages in the eventlog that correspond to this behaviour, and I did try to remove my custom buttons and replaced them with the original ones, but the same thing happen.
I had a similar problem after upgrading from JBuilder X to JBuilder 2005 and I was forced (and still is) to open my form using JBuilder X!
cheers
Per
|
|
| Back to top |
|
 |
Per Skjondal Guest
|
Posted: Mon Dec 12, 2005 7:04 am Post subject: Re: Designer failes to create contentPane |
|
|
Sorry, nothing in the console window.
regards
Per
|
|
| Back to top |
|
 |
Per Skjondal Guest
|
Posted: Mon Dec 12, 2005 8:46 am Post subject: Re: Designer failes to create contentPane |
|
|
Think I found the problem. I am initializing the log4j in the frames constructor with the command PropertyConfigurator.configure(propertyFile);
The designer don't like this at all. After moving it to a separate method it's ok.
Cheers
Per
|
|
| Back to top |
|
 |
Lori M Olson [TeamB] Guest
|
Posted: Mon Dec 12, 2005 3:49 pm Post subject: Re: Designer failes to create contentPane |
|
|
Per Skjondal wrote:
| Quote: | Think I found the problem. I am initializing the log4j in the frames
constructor with the command
PropertyConfigurator.configure(propertyFile); The designer don't like
this at all. After moving it to a separate method it's ok.
Cheers Per
|
I'll explain why that is a problem.
When you run your application from inside JBuilder, the "default"
directory is the project directory. People tend to put their log4j
property files in easy to find places like that.
But the designer is a part of JBuilder, and the "default" directory for
JBuilder is the <jbuilder>bin directory. So the designer cannot find
your property file.
This is immensely annoying, but there isn't a whole lot to be done about
it. But I think it's better to understand "why", so you can work around
it effectively.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
|
|
| Back to top |
|
 |
wbt_ph Guest
|
Posted: Fri Dec 16, 2005 7:49 am Post subject: Re: Designer failes to create contentPane |
|
|
I am a newbie and I use JBuilder 2006 Enterprise Edition.
The designer displays a blank screen after completing the new->frame
(JInternalFrame) wizard.
Components cannot likewise be added to it. I loaded the JB2006 samples
dbswing textpane and the designer still displayed a blank screen. There
is also no message in the event log.
However, the above-mentioned programs run normally.
Any help is appreciated. Thank you.
Wil
Lori M Olson [TeamB] wrote:
| Quote: | Per Skjondal wrote:
Think I found the problem. I am initializing the log4j in the frames
constructor with the command
PropertyConfigurator.configure(propertyFile); The designer don't like
this at all. After moving it to a separate method it's ok.
Cheers Per
I'll explain why that is a problem.
When you run your application from inside JBuilder, the "default"
directory is the project directory. People tend to put their log4j
property files in easy to find places like that.
But the designer is a part of JBuilder, and the "default" directory for
JBuilder is the <jbuilder>bin directory. So the designer cannot find
your property file.
This is immensely annoying, but there isn't a whole lot to be done about
it. But I think it's better to understand "why", so you can work around
it effectively.
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|