Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

NetBeans GUI into Eclipse?

Options
  • 18-09-2011 12:56pm
    #1
    Registered Users Posts: 3,500 ✭✭✭


    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?


Comments

  • Closed Accounts Posts: 564 ✭✭✭2ygb4cmqetsjhx


    Copy and paste the GUI code generated by netbeans should do it.


  • Registered Users Posts: 3,500 ✭✭✭Drexel


    I tried that! didnt work :(. Netbeans generates some strange code!

    I posted the same question on a java forum and the advice they gave me was stick to writing the GUI myself. That it would serve me better in the long run so thats what i think il do!


    Thanks for the reply


  • Registered Users Posts: 360 ✭✭witless1


    jonny666 wrote: »
    I tried that! didnt work :(. Netbeans generates some strange code!

    I posted the same question on a java forum and the advice they gave me was stick to writing the GUI myself. That it would serve me better in the long run so thats what i think il do!


    Thanks for the reply

    I just created a simple GUI in Netbeans, copied and pasted it straight into a new class in Eclipse. Made sure the package name was ok and it ran perfect, all the boilerplate code came over without any hassle. It could be more GUI elements using methods that the Eclipse JDK cannot recognise, at a guess? For example some GUI features say in a 1.6 JDK / JRE have methods that a 1.5 JDK won't recognise. Check your buildpath for the JDK versions and see if that is causing the problems, if both are set to the same copying and pasting between the IDEs shouldn't be a problem.

    If you are looking for the GUI designer within Eclipse, the Netbeans GUI used to be called (Project) Matisse. A quick google threw up this:
    http://marketplace.eclipse.org/content/swing-gui-designer
    I have never used it because both IDEs are strong and it's worth getting comfortable in both. Then you pick the IDE with the strongest toolkit for the job at hand :)

    Oh and most people on Java forums will preach the benefit of hand coding GUIs mainly because they had to do it. I found it a rather useless exercise and it put me off GUIs for a long time. The Matisse palette gives you a skeleton GUI and makes it look somewhat polished but you still have to do all the donkey work and wire up the background on it. You could spend days trying to put together a GUI that could be created in 2 mins with the drag and drop palette. If you are eager to learn the inner workings of the GUI take a look at the auto generated code and read up on the patterns and logic behind the likes of object placement and controlling groups. To use the more advanced aspects of the GUI generator (e.g. Button Group) you will need to know these principles anyway so it is worthwhile but save your sanity and use the tools available :)


  • Closed Accounts Posts: 5,482 ✭✭✭Kidchameleon


    OP,

    I do all my own GUI code, believe me you will get very fast at doing it and have complete control aswell. I don't like the way any IDE generates code, its just too messy for me.


  • Registered Users Posts: 3,500 ✭✭✭Drexel


    witless1 wrote: »
    I just created a simple GUI in Netbeans, copied and pasted it straight into a new class in Eclipse. Made sure the package name was ok and it ran perfect, all the boilerplate code came over without any hassle. It could be more GUI elements using methods that the Eclipse JDK cannot recognise, at a guess? For example some GUI features say in a 1.6 JDK / JRE have methods that a 1.5 JDK won't recognise. Check your buildpath for the JDK versions and see if that is causing the problems, if both are set to the same copying and pasting between the IDEs shouldn't be a problem.

    If you are looking for the GUI designer within Eclipse, the Netbeans GUI used to be called (Project) Matisse. A quick google threw up this:
    http://marketplace.eclipse.org/content/swing-gui-designer
    I have never used it because both IDEs are strong and it's worth getting comfortable in both. Then you pick the IDE with the strongest toolkit for the job at hand :)

    Oh and most people on Java forums will preach the benefit of hand coding GUIs mainly because they had to do it. I found it a rather useless exercise and it put me off GUIs for a long time. The Matisse palette gives you a skeleton GUI and makes it look somewhat polished but you still have to do all the donkey work and wire up the background on it. You could spend days trying to put together a GUI that could be created in 2 mins with the drag and drop palette. If you are eager to learn the inner workings of the GUI take a look at the auto generated code and read up on the patterns and logic behind the likes of object placement and controlling groups. To use the more advanced aspects of the GUI generator (e.g. Button Group) you will need to know these principles anyway so it is worthwhile but save your sanity and use the tools available :)


    Hey thanks for the reply. Both are set to the same JDK anyways. To be honest I found that I could not follow the GUI code that was generated so I wasn't sure exactly to copy.

    I think i will keep going doing it by hand for now until I get more used to it and can read the code generated by netbeans so i can follow what's happening.


  • Advertisement
  • Registered Users Posts: 3,500 ✭✭✭Drexel


    OP,

    I do all my own GUI code, believe me you will get very fast at doing it and have complete control aswell. I don't like the way any IDE generates code, its just too messy for me.

    Thanks for reply! I have been doing it by myself and you are right. I can get the simple ones i need knocked up fairly quick. Im with you regards the way netbeans generates the code, but as I said above it could be that I'm finding it hard to follow


Advertisement