new Swing project

Discussion in 'Java' started by bob smith, Oct 2, 2012.

  1. bob smith

    bob smith Guest

    What is the easiest way to start a new Swing project in Eclipse?
     
    bob smith, Oct 2, 2012
    #1
    1. Advertising

  2. bob smith

    Arne Vajhøj Guest

    On 10/2/2012 10:50 AM, bob smith wrote:
    > What is the easiest way to start a new Swing project in Eclipse?


    You prefer to write the code yourself => plain Java project.

    You prefer GUI builder => install the plugin and then pick Swing project
    type.

    Arne
     
    Arne Vajhøj, Oct 2, 2012
    #2
    1. Advertising

  3. bob smith

    bob smith Guest

    On Tuesday, October 2, 2012 10:08:48 AM UTC-5, Arne Vajhøj wrote:
    > On 10/2/2012 10:50 AM, bob smith wrote:
    >
    > > What is the easiest way to start a new Swing project in Eclipse?

    >
    >
    >
    > You prefer to write the code yourself => plain Java project.
    >
    >
    >
    > You prefer GUI builder => install the plugin and then pick Swing project
    >
    > type.
    >
    >
    >
    > Arne


    I don't see a GUI Builder for Eclipse. Can you provide a link please?
     
    bob smith, Oct 2, 2012
    #3
  4. bob smith

    Arne Vajhøj Guest

    On 10/2/2012 3:02 PM, bob smith wrote:
    > On Tuesday, October 2, 2012 10:08:48 AM UTC-5, Arne Vajhøj wrote:
    >> On 10/2/2012 10:50 AM, bob smith wrote:
    >>> What is the easiest way to start a new Swing project in Eclipse?

    >>
    >> You prefer to write the code yourself => plain Java project.
    >>
    >> You prefer GUI builder => install the plugin and then pick Swing project
    >> type.
    >>
    >> Arne

    >
    > I don't see a GUI Builder for Eclipse. Can you provide a link please?


    It is called WindowBuilder.

    You can find it in Eclipse MarketPlace by name.

    Arne
     
    Arne Vajhøj, Oct 2, 2012
    #4
  5. bob smith

    Joerg Meier Guest

    On Tue, 2 Oct 2012 12:02:46 -0700 (PDT), bob smith wrote:

    > On Tuesday, October 2, 2012 10:08:48 AM UTC-5, Arne Vajhøj wrote:
    >> On 10/2/2012 10:50 AM, bob smith wrote:
    >>> What is the easiest way to start a new Swing project in Eclipse?

    >> You prefer to write the code yourself => plain Java project.
    >> You prefer GUI builder => install the plugin and then pick Swing project
    >> type.

    > I don't see a GUI Builder for Eclipse. Can you provide a link please?


    You googled for "Eclipse GUI builder" and didn't find even one ? I find
    that claim hard to believe.

    In the meantime, there are a few good suggestions here:

    http://stackoverflow.com/questions/29426/best-gui-designer-for-eclipse

    Liebe Gruesse,
    Joerg

    --
    Ich lese meine Emails nicht, replies to Email bleiben also leider
    ungelesen.
     
    Joerg Meier, Oct 2, 2012
    #5
  6. bob smith

    Lew Guest

    Arne Vajhøj wrote:
    >bob smith wrote:
    >> What is the easiest way to start a new Swing project in Eclipse?

    >
    > You prefer to write the code yourself => plain Java project.
    >
    > You prefer GUI builder => install the plugin and then pick Swing project
    > type.


    I have no evidence that this is the easiest way, but it's the way I first tried
    in response to this question:

    - Open Eclipse.
    - Menu: File New Project
    - New project dialog: "Java Project" Next> (I have no Swing plugin)
    - Project Name: "Whatever", "Use default location", Next>
    - Finish

    Context-menu click on project in "Package Explorer" window
    - "New" > "Class"
    - Package: "com.example.whatever"
    - Name: "Example"
    - Check "public static void main(String[] args)" and "Generate comments"
    - Finish

    You get:

    /**
    * Example.
    */
    package com.example.whatever;

    /**
    * Example.
    *
    */
    public class Example {

    /**
    * main.
    *
    * @param args
    */
    public static void main(String[] args) {

    }

    }

    Then start adding Swingish stuff.

    public class Example {
    private static final String TITLE="Example Swing App";

    static final Logger logger = Logger.getLogger(Example.class.getSimpleName());

    private final JFrame appWindow = new JFrame(TITLE);

    /**
    * Constructor.
    */
    public Example()
    {
    appWindow.pack();
    }

    /**
    * Run the screen.
    */
    public void run()
    {
    appWindow.setVisible(true);
    }

    /**
    * main.
    *
    * @param args String array of arguments.
    */
    public static void main(String[] args) {
    logger.fine("main()");

    Runnable gui = new Runnable()
    {
    @Override public void run()
    {
    new Example().run();
    }
    };
    SwingUtilities.invokeLater(gui);
    }

    }

    --
    Lew
     
    Lew, Oct 2, 2012
    #6
  7. bob smith

    bob smith Guest

    On Tuesday, October 2, 2012 2:25:35 PM UTC-5, Arne Vajhøj wrote:
    > On 10/2/2012 3:02 PM, bob smith wrote:
    >
    > > On Tuesday, October 2, 2012 10:08:48 AM UTC-5, Arne Vajh�j wrote:

    >
    > >> On 10/2/2012 10:50 AM, bob smith wrote:

    >
    > >>> What is the easiest way to start a new Swing project in Eclipse?

    >
    > >>

    >
    > >> You prefer to write the code yourself => plain Java project.

    >
    > >>

    >
    > >> You prefer GUI builder => install the plugin and then pick Swing project

    >
    > >> type.

    >
    > >>

    >
    > >> Arne

    >
    > >

    >
    > > I don't see a GUI Builder for Eclipse. Can you provide a link please?

    >
    >
    >
    > It is called WindowBuilder.
    >
    >
    >
    > You can find it in Eclipse MarketPlace by name.
    >
    >
    >
    > Arne


    Ok. Cool. Thanks.
     
    bob smith, Oct 2, 2012
    #7
  8. bob smith

    Roedy Green Guest

    On Tue, 2 Oct 2012 07:50:16 -0700 (PDT), bob smith
    <> wrote, quoted or indirectly quoted someone
    who said :

    >What is the easiest way to start a new Swing project in Eclipse?


    clone the project from one similar you have already done.
    --
    Roedy Green Canadian Mind Products http://mindprod.com
    The iPhone 5 is a low end Rolex.
     
    Roedy Green, Oct 4, 2012
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Big Daddy

    Java 1.2 Swing vs. Java 1.5 Swing

    Big Daddy, Apr 15, 2005, in forum: Java
    Replies:
    2
    Views:
    523
    Pete Barrett
    Apr 16, 2005
  2. mkrause
    Replies:
    0
    Views:
    701
    mkrause
    May 6, 2005
  3. lizard
    Replies:
    0
    Views:
    1,802
    lizard
    Jan 30, 2006
  4. S.T
    Replies:
    2
    Views:
    607
  5. Knute Johnson

    Swing is dead! Long live Swing.

    Knute Johnson, Feb 16, 2012, in forum: Java
    Replies:
    32
    Views:
    3,881
    Daniel Pitts
    Feb 29, 2012
Loading...

Share This Page