• Post Reply Bookmark Topic Watch Topic
  • New Topic

Do I need to change the layout from FreeDesign to BorderLayout or others?

 
Qunfeng Wang
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NetBeans's GUI Builder is quite good to use. But I'm afraid the Free Design is something like JBuilder's XYLayout.

Do I need to change the layout from Free Design to some other layouts supported by Java? I've tried to change it to a GridBagLayout, it's hard to do this. Changeing it to BorderLayout is a little easier.

Thanks.
 
Malith Yapa
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Free design uses the "Absolute Layout" defined in java 6 (and maybe 5) If you're using an older java version like 1.4 netbeans will put the "absolute layout.jar" in your lib folder.. There's absolutely no harm in using the free design upto my knowledge.. But if you're using java 6 you'll have to keep in mind that the free design layout gui won't work when it's been run on earlier jvms.. Like 1.4.. I had to write two separate versions of my gui because of this..
[ July 30, 2007: Message edited by: Malith Yapa ]
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually if you use JDK 6 with NetBeans 5.5 or above, it uses GroupLayout, which is the standard Jave SE library and it does the same thing as the free design layout. So you don't need to worry about having some specific IDE layout. Give it a try
 
Qunfeng Wang
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply.

Unfortunately I'm using JDK1.5. So I have to use other layouts instead of Group Layout used by Free Design. It's not easy to do this in NetBeans. Maybe I need to write GUI code by hand.
 
Malith Yapa
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ooops.. I'm really sorry bro.. Yeah it's group layout and not absolute layout.. However you can use the "absolute layout" Which works almost as good but obviously not as good as free design.. "Absolute layout" works fine with jvm 1.5.. I've tested it on 1.4.. Actually in my software Jleeker i wrote a different version for jvm 1.4 and later users since the group layout is not supported.. And i did that completely using absolute layout.. It might take some time to get used to.. But works fine.. And of course works better than writing the code outta hand..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!