Results 1 to 12 of 12
Like Tree1Likes
  • 1 Post By JosAH

Thread: NetBeans GUI into Eclipse?

  1. #1
    mrbrendano is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default NetBeans GUI into Eclipse?

    Hi I have been studying Java for a few months and have been using eclipse to
    write my code. I started using netbeans for the GUI bits because it is just way
    handier. My questions is, is there a way to import my netbeans gui classes into
    eclipse and write the rest of my code in eclipse?

    Edit: Or is there and eclipse plugin or something that can do the same job on GUI's as netbeans?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: NetBeans GUI into Eclipse?

    You could make your NetBeans code into a jar file and import that jar file on your eclipse project's build path. But having said that, I think that most of the folks here don't use drag-and-drop gui designers to create our Swing GUI's, but rather prefer the flexibility and power of doing it by hand.

    Edit: one more thing I forgot, If you have code on two or more different computers a better option by far is to have them share code by using a revision control system such as SVN. Shoot even if you only have the code on one computer, if it is important, then protect it. Myself, I have just started using Subclipse and Tortoise SVN clients and the Assembla SVN repository and don't know how I managed to anything before with out them. Highly, highly recommended!
    Last edited by Fubarable; 09-18-2011 at 03:32 PM.

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: NetBeans GUI into Eclipse?

    Quote Originally Posted by Fubarable View Post
    Edit: one more thing I forgot, If you have code on two or more different computers a better option by far is to have them share code by using a revision control system such as SVN.
    Eclipse can do that out of the box, i.e. it uses CVS as a repository; almost nobody knows that but even if you develop code on your own the repository can be a life saver when you accidentally delete a file or *shudder* an entire project. There also is a 'team project option that exposes the repository a bit more.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    mrbrendano is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default Re: NetBeans GUI into Eclipse?

    Quote Originally Posted by Fubarable View Post
    You could make your NetBeans code into a jar file and import that jar file on your eclipse project's build path. But having said that, I think that most of the folks here don't use drag-and-drop gui designers to create our Swing GUI's, but rather prefer the flexibility and power of doing it by hand.

    Edit: one more thing I forgot, If you have code on two or more different computers a better option by far is to have them share code by using a revision control system such as SVN. Shoot even if you only have the code on one computer, if it is important, then protect it. Myself, I have just started using Subclipse and Tortoise SVN clients and the Assembla SVN repository and don't know how I managed to anything before with out them. Highly, highly recommended!

    Hey lads thanks for the replies
    .
    Could you explain Why people here don't use a drag and drop method?? Is seems like an awful lot of extra work?

    Also im not sure what a revision control system i. Could you explain that a bit more for me. Im just learning java at home. Would there be a need for one of these??

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: NetBeans GUI into Eclipse?

    Here are some reasons why I code Swing GUI's by hand:
    • If you use a certain tool, you are locked into that tool forever -- as you're noticing with the difficulty of your trying to port your NetBeans-generated GUI application to Eclipse.
    • There's no standard defined for Swing GUI builders, and you're always at the mercy of the developer of the builder tool that you use. If they stop support of their product, your GUI could become unmaintainable.
    • I don't have to worry about corruption of a separate form file which could make my GUI non maintainable.
    • Using a GUI builder shields you from having to know the "innards" of Swing and may hinder your Swing education.
    • By hand coding, I am forced to learn the details of the GUI code, making me understand it better and thus be better able to use it to its full capacity.
    • My GUI code is not bloated and is actually readable and understandable and can use good object oriented programming principles. Since I can understand what my GUI code is doing by glancing at it, I can much more readily re-use it in other applications.
    • I'm not forced into extending my GUI classes by inheritance but can choose to extend by composition where most appropriate.
    • If I've coded Swing by hand and decide later to use a GUI builder, my stronger understanding of Swing basics will make me a much more effective user of the GUI builder tool.
    Last edited by Fubarable; 09-18-2011 at 04:44 PM.

  6. #6
    mrbrendano is offline Member
    Join Date
    Jul 2011
    Posts
    27
    Rep Power
    0

    Default Re: NetBeans GUI into Eclipse?

    I have to admit Fubarable, that is a pretty strong argument for doin it all yourself. The book im using only covers the very basics in swing and when I was pushing ahead doin my own stuff my knowledge was limited so I turned to netbeans for the GUI but i found it very cluttered and hard to keep track of stuff when writing code.

    Im thinkin my best bet would be to get a seperate book on Swing and go ahead and keep coding everything in eclipse. Thanks for the info there.


    If you could, could you give me a run down on what a revision control system
    is?

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: NetBeans GUI into Eclipse?

    Quote Originally Posted by mrbrendano View Post
    Im thinkin my best bet would be to get a seperate book on Swing and go ahead and keep coding everything in eclipse. Thanks for the info there.
    you're quite welcome!


    If you could, could you give me a run down on what a revision control system
    is?
    Please have a look here: wikipedia: Revision_control

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: NetBeans GUI into Eclipse?

    I do like the way Netbeans solved the 'two way' problem (if the layout changes the code changes and if the code changes the layout (structure) may change), i.e. it simply makes the generated code not editable; a 'bit' crude but effective ;-)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    TacoManStan is offline Member
    Join Date
    Sep 2011
    Posts
    50
    Rep Power
    0

    Default Re: NetBeans GUI into Eclipse?

    Well one thing is that you can add in code for every single component that will be added in with the generated code. There are fields like "Before Declaration", "After Declaration", "Before Initialization", "After Initialization", "Before ____", "After ______", etc. It isn't perfect, because once again changing components is rather difficult, but it does give you a little bit more freedom. I believe there are fields in the GUI builder that allows you to put in code pretty much anywhere in the generated code.

    Also, what do people have against using Netbeans to actually code? I like it...
    Last edited by JosAH; 09-18-2011 at 06:57 PM.

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: NetBeans GUI into Eclipse?

    If you know what you're doing there's not much wrong with GUI builders, but you're an exception to the rule then; the majority of those GUI builder users simply dump their code here, full of .addComponent(theWorld).addComponent(theUniverse). addComponent(andEverything), and tell us that the crap 'doesn't work'.

    kind regards,

    Jos
    Last edited by JosAH; 09-18-2011 at 06:56 PM.
    Fubarable likes this.
    cenosillicaphobia: the fear for an empty beer glass

  11. #11
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,433
    Blog Entries
    7
    Rep Power
    20

    Default Re: NetBeans GUI into Eclipse?

    I goofed and ruined the reply by TacoManStan; l was lucky and received his reply by email as well, so I was able to repair all my mishap; sorry about the trouble my goofing might have caused ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  12. #12
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: NetBeans GUI into Eclipse?

    Quote Originally Posted by TacoManStan View Post
    Also, what do people have against using Netbeans to actually code? I like it...
    If you mean what do I have against using NetBeans as an IDE: none, none at all.
    If you mean what do I have against using NetBeans to generate GUI code: surely you don't want me to repeat what I already have fully delineated in post #5 above, do you?

Similar Threads

  1. Netbeans vs. Eclipse
    By Qsc in forum New To Java
    Replies: 24
    Last Post: 11-23-2011, 11:04 AM
  2. Replies: 2
    Last Post: 10-04-2010, 11:18 PM
  3. Eclipse vs Netbeans
    By baby_IT in forum New To Java
    Replies: 4
    Last Post: 11-07-2008, 06:15 AM
  4. NetBeans to Eclipse
    By ravian in forum NetBeans
    Replies: 6
    Last Post: 12-06-2007, 02:38 AM
  5. Dilemma netbeans or eclipse
    By Nick15 in forum NetBeans
    Replies: 8
    Last Post: 11-08-2007, 04:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •