Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style?
Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style? [message #127556] Wed, 05 July 2006 00:06 Go to next message
Eclipse UserFriend
Some of my classes are (surprisingly) editable in VE.
JBuilder throws all of its auto-generated GUI code in one big fat jbInit() method whereas VE creates a initialize() method and has a bunch of getXYZ() methods.

Is there anyway to make VE look at the jbInit() code (which it obviously understands) and replace it with initialize() + getXYZ() style code?
Re: Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style? [message #127596 is a reply to message #127556] Wed, 05 July 2006 09:43 Go to previous message
Eclipse UserFriend
Originally posted by: jefmyers.us.ibm.com

Khalid,

The VE does look in the jbInit() blocks and works for the most part with
JBuilder classes. The main issue is the JBuilder statements that start
with a call getContentPane(). The VE does not work with these
statements. The way to fix this is to declare a new JPanel, use the
setContentPane() method to set it as the class's content pane, then
replace all the getContentPane() calls in the class with references to
your JPanel. For example, change getContentPane().add(myJButton); to
contentPane.add(myJButton); That should resolve most problems with the
VE opening classes designed with JBuilder.

There is no automatic refactoring of JBuilder style code to VE style.
If you wanted to write one, it'd be a great contribution to the VE project.

Hope this helps,
- Jeff


Khalid Zubair wrote:
> Some of my classes are (surprisingly) editable in VE.
> JBuilder throws all of its auto-generated GUI code in one big fat jbInit() method whereas VE creates a initialize() method and has a bunch of getXYZ() methods.
>
> Is there anyway to make VE look at the jbInit() code (which it obviously understands) and replace it with initialize() + getXYZ() style code?
Re: Migrated from JBuilder to Eclipse, how to transform jbinit() -> VE style? [message #613450 is a reply to message #127556] Wed, 05 July 2006 09:43 Go to previous message
Eclipse UserFriend
Khalid,

The VE does look in the jbInit() blocks and works for the most part with
JBuilder classes. The main issue is the JBuilder statements that start
with a call getContentPane(). The VE does not work with these
statements. The way to fix this is to declare a new JPanel, use the
setContentPane() method to set it as the class's content pane, then
replace all the getContentPane() calls in the class with references to
your JPanel. For example, change getContentPane().add(myJButton); to
contentPane.add(myJButton); That should resolve most problems with the
VE opening classes designed with JBuilder.

There is no automatic refactoring of JBuilder style code to VE style.
If you wanted to write one, it'd be a great contribution to the VE project.

Hope this helps,
- Jeff


Khalid Zubair wrote:
> Some of my classes are (surprisingly) editable in VE.
> JBuilder throws all of its auto-generated GUI code in one big fat jbInit() method whereas VE creates a initialize() method and has a bunch of getXYZ() methods.
>
> Is there anyway to make VE look at the jbInit() code (which it obviously understands) and replace it with initialize() + getXYZ() style code?
Previous Topic:IllegalStateException recovery
Next Topic:Project file will not open
Goto Forum:
  


Current Time: Wed Jul 30 14:17:05 EDT 2025

Powered by FUDForum. Page generated in 0.03388 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top