This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
AWT Form editor generate code which is not compatible with CDC AWT specification - CDC specs doesn't know anything about BorderLayout.PAGE_START
We could adjust BorderLayout support to use the "absolute" constraints for AWT components, and the "relative" for Swing components. That would fix the problem.
is there a more generic way how to specify the generated code? I assume that there will be other areas when the J2SE form style will not fit into J2ME (CDC/PP etc.) style :(
I'm increasing the priority. It's important issue for Mobility. The generated code doesn't work and there is no way how to resolve it.
testing project with source code http://www.netbeans.org/nonav/issues/showattachment.cgi/41739/CdcApplication2.zip detailed steps: -create new Mobility > CDC Application on platform Nokia S80 CDC PP SDK -let the Create Main class selected when creating the project, press finish -new project is created, form opened, the layout otf the form is BorderLayout -add label from the palette to top(important) of the empty form. -go to source ->uncompilable code add(label1, java.awt.BorderLayout.PAGE_START);
Fixed. /cvs/form/src/org/netbeans/modules/form/layoutsupport/delegates/BorderLayoutSupport.java new revision: 1.10; previous revision: 1.9 Diff: http://form.netbeans.org/source/browse/form/src/org/netbeans/modules/form/layoutsupport/delegates/BorderLayoutSupport.java?r1=1.9&r2=1.10
Integrated to release60-m9 branch.
unfortunately, this issue still happens with projects on CDC Toolkit platform which uses AGUI optional package. It provides Swing components for CDC/PP. Reproduce: 1, add CDC TK as Java platform to IDE - http://java.sun.com/products/cdctoolkit/download-1_0.html 2, create new project - Mobility > CDC Application. Use the CDC TK as platform. Let it create main class. 3, change the Layout of the Main class to Border layout 4, place a component to NORTH of the layout 5, go to source or compile -> Personal Profile doesn't know java.awt.BorderLayout.PAGE_START
Yep, I can see it. Previously it was problem with AWT platform though. But it uses still java.awt.BorderLayout which for CDC doesn't support relative positioning.
Yes, we could make a distiction for AWT-based components where the component orientation was not that important, but for Swing we need to use the relative constants. Now it's problem of AGUI in the first place - it claims it provides Swing components but it's obviously missing some features. Unfortunately I see no easy way how to distinguish AGUI from Swing and I don't want to do some extensive hacks for this, it's not sustainable in longer time. The GUI builder is for Swing in the first place. Please reevaluate the importance of this issue.
My 2 cents 1) AGUI is dead horse 2) Default layout (FreeForm) is working fine 3) You can workaround it by selecting position constant in properties dialog
ok, I agree with decreasing the priority to P3. It works for CDC/PP but not for AGUI optional package. The AGUI is not supported by any phone yet (I'm not counting the Savaje's prototype). We will need a solution for CDC in long term. IMO, there might be other areas that are influenced by a "small" difference between CDC/PP x J2SE. Anyway, where exactly I can set it to not generate the PAGE_START but the NORTH instead?
The layout constraint can be changed in property sheet, there's Direction property in Layout section.
I guess we can already close this as won't fix, right?