Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: Is it really this retro?

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    20
    Thanks
    13
    Thanked 1 Time in 1 Post

    Default Is it really this retro?

    I've just gotten started with Java, coming from the Delphi and C# (WPF) world.

    So far I've only seen examples of programmatically creating components. Is it really so that there is no "Toolbox" from which one can drag and drop buttons, textBoxes, and the like?

    I know, coming from WPF/XAML I can't say too much - you CAN drag and drop, but it's often more trouble than its worth and you're better off using XAML directly to create your components/controls.


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,584
    Thanks
    49
    Thanked 2,233 Times in 2,205 Posts

    Default Re: Is it really this retro?

    I think there are IDEs that do some of that.

  3. #3
    Forum Squatter newbie's Avatar
    Join Date
    Nov 2010
    Location
    North Wales
    Posts
    661
    My Mood
    Stressed
    Thanks
    28
    Thanked 115 Times in 106 Posts
    Blog Entries
    1

    Default Re: Is it really this retro?

    Netbeans IDE has a good Swing toolbox to do what you require.
    Welcome to NetBeans

    Though it is probably best to start off writing GUIs programmatically as it eases your development of learning GUIs.
    Please use [highlight=Java]//code goes here...[/highlight] tags when posting your code

  4. #4
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Is it really this retro?

    The new Eclipse Indigo release packages the Window Designer package which allows you to easily design Swing and SWT apps.

  5. The Following User Says Thank You to helloworld922 For This Useful Post:

    Blackbird (July 4th, 2011)

  6. #5
    Junior Member
    Join Date
    Jul 2011
    Posts
    20
    Thanks
    13
    Thanked 1 Time in 1 Post

    Default Re: Is it really this retro?

    <<The new Eclipse Indigo release packages the Window Designer package which allows you to easily design Swing and SWT apps.>>

    That's what I downloaded, and looking through the menu items, it doesn't seem obvious where this Window Designer is (maybe I'm suffering temporary selective blindness...?)

  7. #6
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Is it really this retro?

    The swing designer stuff isn't under the Java folder when you're trying to create a new file. If you scroll down (after you select "new->other"), there's a folder called "WindowBuilder". Inside there is are a few different options, including the Swing Designer and SWT Designer.

    Alternatively, if you have your own JComponent (say, a custom JFrame) you should be able to just right click the source file and say "Open With->Window Builder Editor"

  8. The Following User Says Thank You to helloworld922 For This Useful Post:

    Blackbird (July 5th, 2011)

  9. #7
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    471
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: Is it really this retro?

    GUI designers are fine for one-off fire-and-forget GUI developments, but if you're likely to have to maintain or enhance a GUI, they can be a horrible trap because the code they generate and/or the components they use are generally not easily maintainable by hand, so you are reliant on having that particular GUI designer, tools and even jars, available. I know from bitter experience that you can't rely on this.

    For serious work, it's far better to write the GUI yourself using simple and easy-to-understand layouts like BorderLayout, BoxLayout, CardLayout, etc. This is more likely to give you maintainable code.

  10. The Following 2 Users Say Thank You to dlorde For This Useful Post:

    Blackbird (July 5th, 2011), ChristopherLowe (July 4th, 2011)

  11. #8
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Is it really this retro?

    Quote Originally Posted by dlorde View Post
    GUI designers are fine for one-off fire-and-forget GUI developments, but if you're likely to have to maintain or enhance a GUI, they can be a horrible trap because the code they generate and/or the components they use are generally not easily maintainable by hand, so you are reliant on having that particular GUI designer, tools and even jars, available. I know from bitter experience that you can't rely on this.

    For serious work, it's far better to write the GUI yourself using simple and easy-to-understand layouts like BorderLayout, BoxLayout, CardLayout, etc. This is more likely to give you maintainable code.
    I use both. The GUI designer is great for creating a base to work off of, but the part I like the most about Eclipse's GUI builder is the ability to basically modify the source file any way you want, letting you clean up and refine the way the GUI works, or even dramatically change its behavior or look via the code.

  12. The Following User Says Thank You to helloworld922 For This Useful Post:

    Blackbird (July 5th, 2011)

  13. #9
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    471
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: Is it really this retro?

    Quote Originally Posted by helloworld922 View Post
    I use both. The GUI designer is great for creating a base to work off of, but the part I like the most about Eclipse's GUI builder is the ability to basically modify the source file any way you want, letting you clean up and refine the way the GUI works, or even dramatically change its behavior or look via the code.
    Naturally, once you have some experience and knowledge, it's a judgement call - how easy is the generated code to work with, can you (or will you want to) use the GUI designer on it once you've hacked it manually, how much is there to do, etc., etc. My point is that you shouldn't become dependent on a particular GUI designer, and you do need to know how to do the job manually

  14. The Following User Says Thank You to dlorde For This Useful Post:

    Blackbird (July 5th, 2011)