Eclipse GUI plugin suggestions please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeffbroodwar
    New Member
    • Oct 2006
    • 118

    Eclipse GUI plugin suggestions please

    Hello everyone,

    Just started using eclipse ide.... just want to know what GUI plugin is preferred by eclipse users... hope its free.. ^^ ;


    Thanks,
    Pupoy
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by jeffbroodwar
    Hello everyone,

    Just started using eclipse ide.... just want to know what GUI plugin is preferred by eclipse users... hope its free.. ^^ ;


    Thanks,
    Pupoy
    I've been using Eclipse since version 2.1 and don't use any plugins; for ordinary
    JSE work you don't need any.

    kind regards,

    Jos

    Comment

    • jeffbroodwar
      New Member
      • Oct 2006
      • 118

      #3
      Hi Jos,

      ehehe its you again. lolz. I used to work using netbeans... in eclipse after you create a class, you will be the one to control your code ryt? meaning even if you dont use VSE you can create an object using your own style....


      can you please paste a simple class that will show a frame and a single button in the center just to see how it works without the netbeans' auto generated code.

      Thanks again.

      Best regards,
      Pupoy

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Sure, here you go:

        [code=java]
        import java.awt.Border Layout;
        import java.awt.Contai ner;
        import java.awt.Dimens ion;
        import java.awt.event. ActionEvent;
        import java.awt.event. ActionListener;

        import javax.swing.Box ;
        import javax.swing.JBu tton;
        import javax.swing.JFr ame;

        public class TestFrame extends JFrame {

        public TestFrame(Strin g buttonText) {

        initialize(butt onText);
        }

        private void initialize(Stri ng buttonText) {

        Container c= this.getContent Pane();

        c.setLayout(new BorderLayout()) ;
        c.add(Box.creat eVerticalStrut( 20), BorderLayout.NO RTH);
        c.add(Box.creat eVerticalStrut( 20), BorderLayout.SO UTH);
        c.add(Box.creat eHorizontalStru t(20), BorderLayout.WE ST);
        c.add(Box.creat eHorizontalStru t(20), BorderLayout.EA ST);

        JButton b= new JButton(buttonT ext);

        b.addActionList ener(new ActionListener( ) {
        public void actionPerformed (ActionEvent ae) {
        System.exit(0);
        }
        });

        c.add(b, BorderLayout.CE NTER);

        this.pack();
        this.setTitle(" title: "+buttonTex t);
        this.setDefault CloseOperation( DO_NOTHING_ON_C LOSE);
        this.setLocatio nRelativeTo(nul l);

        this.setVisible (true);
        }

        public static void main(String[] args) {

        new TestFrame("boo" );
        }
        }
        [/code]

        kind regards,

        Jos

        Comment

        • BigDaddyLH
          Recognized Expert Top Contributor
          • Dec 2007
          • 1216

          #5
          Originally posted by jeffbroodwar
          can you please paste a simple class that will show a frame and a single button in the center just to see how it works without the netbeans' auto generated code.
          If you're starting out in Swing, then you definitely should read the tutorial. Just skip the Netbeanz parts :-)

          This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components

          Comment

          • jeffbroodwar
            New Member
            • Oct 2006
            • 118

            #6
            thanks for the code... its really different with netbeans lolz. with that all code... in netbeans it'll only show to subclasses one is your button event and the other is your starting class (public static void.....) i'm just worried if i'll try to develop a simple inventory system in eclipse...i thought it might take years before i finish it.... any suggestions?

            BTW thanks for the tutorial link.

            kind regards,
            Pupoy

            Comment

            • JosAH
              Recognized Expert MVP
              • Mar 2007
              • 11453

              #7
              Originally posted by jeffbroodwar
              thanks for the code... its really different with netbeans lolz. with that all code... in netbeans it'll only show to subclasses one is your button event and the other is your starting class (public static void.....) i'm just worried if i'll try to develop a simple inventory system in eclipse...i thought it might take years before i finish it.... any suggestions?

              BTW thanks for the tutorial link.

              kind regards,
              Pupoy
              I just hacked that code together in a minute; don't consider it good style. It does
              make its point: you don't need any gui writing thing that does a job for you and
              you shouldn't think of guis in a 'linear' way. Think of components inside other
              components inside other components etc. Each component takes care of one
              little aspect, e.g. centering some components has two aspects: centering in
              the horizontal direction and centering in the vertical direction. Study that
              LayoutManager tutorial and you'll get it. One last warning: only use that GridBag
              LayoutManager if all else fails.

              kind regards,

              Jos

              Comment

              • BigDaddyLH
                Recognized Expert Top Contributor
                • Dec 2007
                • 1216

                #8
                Originally posted by JosAH
                One last warning: only use that GridBag
                LayoutManager if all else fails.
                I've got a different take on that: there have been times when I've simplified layout code using GBL. (Replaced nested layouts.) Heres a simple example of a layout:

                label textfield
                label textfield
                label combo
                label checkbox
                label textfield
                ...

                It's just a list of controls that you'd like to be labeled on the left: "first name:", "last name:" etc... A grid box is too crude because the two columns may look bad with the same width. And side-by-side Box-es wouldn't work because the corresponding label+component pair may not line up vertically. But this is a natural for GBL.

                Comment

                • JosAH
                  Recognized Expert MVP
                  • Mar 2007
                  • 11453

                  #9
                  Originally posted by BigDaddyLH
                  I've got a different take on that: there have been times when I've simplified layout code using GBL. (Replaced nested layouts.)
                  That's a clear case of "if all else fails" but I still have a little fiddling with that
                  new SpringLayout on my TODO list.

                  kind regards,

                  Jos

                  Comment

                  • jeffbroodwar
                    New Member
                    • Oct 2006
                    • 118

                    #10
                    hmm...mean, if i'll be developing a simple inventory system with charts,webservi ce and reports... i'll be doing all the coding? dont u think it'll take years to finish? considering all the bloody error messages that i'll get.

                    Kind regards,
                    Pupoy

                    Comment

                    • JosAH
                      Recognized Expert MVP
                      • Mar 2007
                      • 11453

                      #11
                      Originally posted by jeffbroodwar
                      hmm...mean, if i'll be developing a simple inventory system with charts,webservi ce and reports... i'll be doing all the coding? dont u think it'll take years to finish? considering all the bloody error messages that i'll get.

                      Kind regards,
                      Pupoy
                      There is no need to write that all from scratch; for the charts JFreeChart comes
                      to mind; for the webservices Apache's Tomcat is an obvious choice and for
                      reporting JasperReports does most of the job.

                      kind regards,

                      Jos

                      Comment

                      Working...