javacv error in eclipse

  • (2 Pages)
  • +
  • 1
  • 2

29 Replies - 4188 Views - Last Post: 03 October 2012 - 12:19 PM Rate Topic: -----

#16 nick2price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 562
  • View blog
  • Posts: 2,826
  • Joined: 23-November 07

Re: javacv error in eclipse

Posted 03 October 2012 - 03:13 AM

lol, this post has gone a bit off topic, oh well, lol. Trust me Farrell, if you used the GUI builder in the professional world, you will get your ass whooped, lol. There is a good reason people on here suggest not to use it, not only because of the code it produces, but also because you become reliant on it and therefore lose the ability to properly understand Swing. If you see code produced by the gui builder over and over, you will tend to apply that sort of coding style when you hardcode Swing.
Was This Post Helpful? 0
  • +
  • -

#17 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 841
  • View blog
  • Posts: 2,576
  • Joined: 29-July 11

Re: javacv error in eclipse

Posted 03 October 2012 - 03:17 AM

View PostCasiOo, on 03 October 2012 - 10:06 AM, said:

Are you comparing WPF and netbeans java GUI builder? It is not even close to being the same.


I think you mean Visual Studio's visual designed when you write WPF, but sure, one could compare them, although they are different. They don't have tp be the same to accomplish similar goals. You won't find many Visual Studio users wasting they're time writing GUI code by hand, although XAML is very nice, and there are those who prefer to do it by hand, but it is still more time consuming than it needs to be. It's your perogative, but anyone who claims that writing code by hand, as opposed to using a GUI builder is faster and more efficient hasn't taken the time to learn the GUI builder.

View Postnick2price, on 03 October 2012 - 10:13 AM, said:

lol, this post has gone a bit off topic, oh well, lol. Trust me Farrell, if you used the GUI builder in the professional world, you will get your ass whooped, lol. There is a good reason people on here suggest not to use it, not only because of the code it produces, but also because you become reliant on it and therefore lose the ability to properly understand Swing. If you see code produced by the gui builder over and over, you will tend to apply that sort of coding style when you hardcode Swing.


People here suggest not using it because they can't read Grouplayout. They see it and immediately throw up their arms and proclaim that 0the GUI builder creates "terribly unreadable code", which is just plain nonsense.

I work for a very small accounting firm. The developers use Matisse for all our office tools. If you think that no one is using Matisse or WindowBUulder, you're fooling yourself.

This post has been edited by farrell2k: 03 October 2012 - 03:23 AM

Was This Post Helpful? 0
  • +
  • -

#18 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7747
  • View blog
  • Posts: 13,105
  • Joined: 19-March 11

Re: javacv error in eclipse

Posted 03 October 2012 - 05:03 AM

View Postfarrell2k, on 03 October 2012 - 03:17 AM, said:

Eclipse is such a terrible, buggy IDE.


I find this unlikely. Eclipse is one of the most-used open-source tools in the world, and it's used (obviously) only by developers, all of whom would love to have committed a change to its source tree.
In that environment, I would expect that an actual bug would have a very short half-life indeed.

Have you found actual bugs in Eclipse, or is this hyperbole? There's a big difference between "I don't like this tool" and "this program has errors that affect its functionality in a significant way".

I'm asking out of genuine curiosity, since I don't actually use tools of this sort enough to know whether one or the other of them has significant bugs. (I use an integrated development environment: it's called linux, and it works a treat) However, I've had occasion to use Eclipse from time to time over the last few years and it seems to me that it works fine, apart from being a mouse-driven interface that tries to be helpy-helpy at you, which is in fact what you're paying for.

But if you've found actual bugs, that'd be interesting. If not, you should probably not mislead the novices, and constrain yourself instead to facts instead.



As for GUI builders, there's certainly a use case for that tool. If your GUI doesn't matter that much to you, and you just want to get a framework up, and you're not doing anything much with it, I'm sure the GUI builder gets you to mediocre a lot faster than you would doing it by hand. However, once you go down that road, you're committed to working in that tool, and tweaks by hand are pretty much out of the question as far as I can tell. So it's a decision you make. Since the actual GUI is often not the actual concern if you're just cranking out a tool to do a job, I would imagine that generated code makes sense a lot of the time.
Another reasonable use case would be to whip out a placeholder UI in the GUI builder and then build something more you your liking as a final step. This would be handy because it would enforce some good design decisions around separation of concerns.

What I'm finding a little curious is the idea that this decision should affect your choices about the rest of your toolchain. Surely your toolset should be modular, no? If your IDE doesn't allow you to work with any existing GUI builder or no GUIBuilder at all, or if your GUI builder is inseparable from your IDE, then it's not really a very good development environment at all, is it?
I mean, I would assume the point of an "Integrated Development Environment" would be to give you a way to glue together the tools you want to use to make the programs you want to make, right? If you want to use svn or git or bazaar or some other source control tool, it's your IDE's job to let you do that. If you want to use ant or maven or some other build tool, it's the responsibility of an IDE to say "yes, boss" and do that. Surely you wouldn't want an IDE that constrains you on these choices, right? Why wouldn't you want to see the same modularity in your GUI builder?

Again, this is honest curiosity - the idea of starting up a heavyweight program like Eclipse or NetBeans or something when you have all of the tools you need at your fingertips is just not one that seems reasonable to me, so I don't actually understand the mindset involved.
Was This Post Helpful? 1
  • +
  • -

#19 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 841
  • View blog
  • Posts: 2,576
  • Joined: 29-July 11

Re: javacv error in eclipse

Posted 03 October 2012 - 05:23 AM

Why do you think the Netbeans GUI builder code is insperable from the IDE? It's 100% java code. I could do my code in the netbeans builder, copy and paste it into my eclipse project and work on it from there.
Was This Post Helpful? 0
  • +
  • -

#20 CasiOo  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1398
  • View blog
  • Posts: 3,097
  • Joined: 05-April 11

Re: javacv error in eclipse

Posted 03 October 2012 - 05:29 AM

View Postfarrell2k, on 03 October 2012 - 10:17 AM, said:

View PostCasiOo, on 03 October 2012 - 10:06 AM, said:

Are you comparing WPF and netbeans java GUI builder? It is not even close to being the same.


I think you mean Visual Studio's visual designed when you write WPF, but sure, one could compare them, although they are different. They don't have tp be the same to accomplish similar goals. You won't find many Visual Studio users wasting they're time writing GUI code by hand, although XAML is very nice, and there are those who prefer to do it by hand, but it is still more time consuming than it needs to be. It's your perogative, but anyone who claims that writing code by hand, as opposed to using a GUI builder is faster and more efficient hasn't taken the time to learn the GUI builder.

View Postnick2price, on 03 October 2012 - 10:13 AM, said:

lol, this post has gone a bit off topic, oh well, lol. Trust me Farrell, if you used the GUI builder in the professional world, you will get your ass whooped, lol. There is a good reason people on here suggest not to use it, not only because of the code it produces, but also because you become reliant on it and therefore lose the ability to properly understand Swing. If you see code produced by the gui builder over and over, you will tend to apply that sort of coding style when you hardcode Swing.


People here suggest not using it because they can't read Grouplayout. They see it and immediately throw up their arms and proclaim that 0the GUI builder creates "terribly unreadable code", which is just plain nonsense.

I work for a very small accounting firm. The developers use Matisse for all our office tools. If you think that no one is using Matisse or WindowBUulder, you're fooling yourself.


I am talking about WPF and XAML. The VS gui builder produces XAML for you, and it is maintainable and easy to manipulate. Java doesn't have anything like WPF, and the code generated by the java gui builders are horrible. Thank god Android introduced declarative XML and not some crappy swing-like gui builder

This post has been edited by CasiOo: 03 October 2012 - 05:29 AM

Was This Post Helpful? 0
  • +
  • -

#21 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7747
  • View blog
  • Posts: 13,105
  • Joined: 19-March 11

Re: javacv error in eclipse

Posted 03 October 2012 - 06:33 AM

View Postfarrell2k, on 03 October 2012 - 07:23 AM, said:

Why do you think the Netbeans GUI builder code is insperable from the IDE? It's 100% java code. I could do my code in the netbeans builder, copy and paste it into my eclipse project and work on it from there.


If you're copying and pasting, you're not using an integrated development environment.
Was This Post Helpful? 0
  • +
  • -

#22 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 841
  • View blog
  • Posts: 2,576
  • Joined: 29-July 11

Re: javacv error in eclipse

Posted 03 October 2012 - 10:03 AM

View PostCasiOo, on 03 October 2012 - 12:29 PM, said:

I am talking about WPF and XAML. The VS gui builder produces XAML for you, and it is maintainable and easy to manipulate. Java doesn't have anything like WPF, and the code generated by the java gui builders are horrible. Thank god Android introduced declarative XML and not some crappy swing-like gui builder


FXML is just like XAML. I agree that Swing is the least desireable GUI code to write. I think Netbeans produces perfectly readable code, because I don't use Grouplayout. I use BorderLayout, Flowlayout, etc.

View Postjon.kiparsky, on 03 October 2012 - 01:33 PM, said:

If you're copying and pasting, you're not using an integrated development environment.


I'll have to remember to let Eclipse know that it is not an IDE next time I am copying and pasting some code from Netbeans to Eclipse for an Android project...

This post has been edited by farrell2k: 03 October 2012 - 10:05 AM

Was This Post Helpful? 0
  • +
  • -

#23 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7747
  • View blog
  • Posts: 13,105
  • Joined: 19-March 11

Re: javacv error in eclipse

Posted 03 October 2012 - 10:06 AM

View PostCasiOo, on 03 October 2012 - 07:29 AM, said:

Thank god Android introduced declarative XML and not some crappy swing-like gui builder


A-bloody-men to that one.
Was This Post Helpful? 0
  • +
  • -

#24 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: javacv error in eclipse

Posted 03 October 2012 - 11:02 AM

View Postfarrell2k, on 03 October 2012 - 06:17 AM, said:

People here suggest not using it because they can't read Grouplayout. They see it and immediately throw up their arms and proclaim that 0the GUI builder creates "terribly unreadable code", which is just plain nonsense.

You still miss the whole point despite all the efforts we did in the past to explain it to you

Quote

I work for a very small accounting firm. The developers use Matisse for all our office tools. If you think that no one is using Matisse or WindowBUulder, you're fooling yourself.

We are talking Java GUI here nothing to do with Matisse (if you are talking of the SQL software) or whatever GUI Matisse can be
Sure that will never design my GUI by hand in VB.
Was This Post Helpful? 0
  • +
  • -

#25 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 841
  • View blog
  • Posts: 2,576
  • Joined: 29-July 11

Re: javacv error in eclipse

Posted 03 October 2012 - 11:16 AM

View Postpbl, on 03 October 2012 - 06:02 PM, said:

You still miss the whole point despite all the efforts we did in the past to explain it to you

Quote

I work for a very small accounting firm. The developers use Matisse for all our office tools. If you think that no one is using Matisse or WindowBUulder, you're fooling yourself.

We are talking Java GUI here nothing to do with Matisse (if you are talking of the SQL software) or whatever GUI Matisse can be
Sure that will never design my GUI by hand in VB.


Matisse is the former name of the GUI builder in Netbeans. I remember your example where you erroneously think that you have to design JTables in the designer, and believe for whatever reason that you cannot write a method that returns
a JTable which could then be posted to the EDT and added to the form completely outside of the designer. Something along those lines. It's just as false today as whenever you wrote it.

If you think something like this is "unreadable", then I don't know what to say...

public class MainFrame extends javax.swing.JFrame {

    /**
     * Creates new form MainFrame
     */
    public MainFrame() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        searchButton = new javax.swing.JButton();
        searchField = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        searchButton.setText("Search");
        searchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchButtonActionPerformed(evt);
            }
        });
        getContentPane().add(searchButton, java.awt.BorderLayout.PAGE_END);

        searchField.setText("Enter search term here...");
        getContentPane().add(searchField, java.awt.BorderLayout.PAGE_START);

        pack();
    }// </editor-fold>

    private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {
        searchField.setText("you clicked!");
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainFrame().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify
    private javax.swing.JButton searchButton;
    private javax.swing.JTextField searchField;
    // End of variables declaration
}



In any event, you guys can paint your walls with a paint brush. I'll stick to using a paint roller. :)

This post has been edited by farrell2k: 03 October 2012 - 11:17 AM

Was This Post Helpful? 0
  • +
  • -

#26 CasiOo  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1398
  • View blog
  • Posts: 3,097
  • Joined: 05-April 11

Re: javacv error in eclipse

Posted 03 October 2012 - 11:29 AM

Quote

In any event, you guys can paint your walls with a paint brush. I'll stick to using a paint roller.


Thank you :P The details my brush can make are amazing
Was This Post Helpful? 2
  • +
  • -

#27 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: javacv error in eclipse

Posted 03 October 2012 - 11:54 AM

View Postfarrell2k, on 03 October 2012 - 02:16 PM, said:

In any event, you guys can paint your walls with a paint brush. I'll stick to using a paint roller. :)

And we'll take care or the corners :)
I doubt the Joconde was painted with a roller ? But I guess your roller is OK for abstract art not really important if it does not look anything :)

So continue painting your walls, CasiOo and I will paint the Mona Lisa

This post has been edited by pbl: 03 October 2012 - 12:02 PM

Was This Post Helpful? 2
  • +
  • -

#28 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7747
  • View blog
  • Posts: 13,105
  • Joined: 19-March 11

Re: javacv error in eclipse

Posted 03 October 2012 - 12:01 PM

I gotta say, I've built plenty of little widgets where a simple GUI builder would probably have saved me time if I'd taken the time to deploy it. If the UI is not important, a builder can be very handy.

It's a judgement call. You pick what works.

This post has been edited by jon.kiparsky: 03 October 2012 - 12:17 PM

Was This Post Helpful? 0
  • +
  • -

#29 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: javacv error in eclipse

Posted 03 October 2012 - 12:11 PM

Yes for a quick proof of concept
Was This Post Helpful? 0
  • +
  • -

#30 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7747
  • View blog
  • Posts: 13,105
  • Joined: 19-March 11

Re: javacv error in eclipse

Posted 03 October 2012 - 12:19 PM

Yes, or for an internal app that's only going to be used by my co-workers at BigFiancialCorp. If I can get the UI done in ten minutes, that means I can build a lot more functionality. If my co-workers look at an ugly UI, that's okay with me. :)
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2