0

I am currently learning the ropes of jgoodies FormLayout and have already made quite some progress.

However, the ButtonBarsExample from the java2s.com website doesn't seem to be compilable as there are some methods missing in my com.jgoodies.forms library.

My library is the newest I could find, the manifest states "Implementation-Version: 1.8.0 2014-02-27 12:03:02". The above mentioned "ButtonBarsExample.java" is much older, the header says "Copyright (c) 2002-2004".

Other examples which use the same library compile well, so the classpath seems to be set correctly. Here is an example of the code I want to compile:

private Component buildButtonBar2Panel() {
    ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGlue();
    builder.addGriddedButtons(new JButton[] { new JButton("Yes"), new JButton("No") });
    return wrap(builder.getPanel(), "This bar has been built with a ButtonBarBuilder:\n"
        + " o buttons have a minimum widths,\n" + " o the button order honors the platform default,\n"
        + " o the button gap is a logical size that follows a style guide.");
}

And this is (amongst others) the error I get:

ButtonBarsExample.java:72: error: cannot find symbol
    builder.addGriddedButtons(new JButton[] { new JButton("Yes"), new JButton("No") });
           ^      symbol:   method addGriddedButtons(JButton[]) ;

I guess that the methods in question do simply not exists any more in the newest version of the jgoodies forms-library. I have searched the web but couldn't find any 'deprecated' hints.

So my questions are:

  • Do I have to install any other library than com.jgoodies.forms to compile this example?
  • Is there any known replacement one could use?

Any help is very much appreciated!

emax
  • 307
  • 3
  • 7
  • 1
    A [search in GrepCode](http://grepcode.com/search?query=com.jgoodies.forms.builder.ButtonBarBuilder&start=0&entity=type&n=) gives you several versions of this library, some of which contain the aforesaid methods, some of which do not. You may want to look for those specific versions. – RealSkeptic Feb 25 '17 at 14:36
  • Thanks for the hint. However, at a first glance I wasn't successful with that. Another thing is that I'd prefer to go with the most recent version. Luckily, I've found an up-to-date webstart showcase at jgoodies [link](http://www.jgoodies.com/downloads/demos/) which shows a few button-layout-implementations, But thank you anyway. – emax Feb 28 '17 at 15:30
  • That won't be free, then. The author says in his web site that only the old versions in the archive are given free, and new versions are for subscribers only. – RealSkeptic Feb 28 '17 at 15:31
  • @RealSkeptic Ok, most recent _free_ version. But maybe you are right and the showcases rely on payed versions. I will try again in GrepCode (which I haven't heard about before). – emax Feb 28 '17 at 15:36
  • I gave the link in `GrepCode` as a way to look up which versions contain the methods you need. You won't find the actual downloads there, just hints to the sources. – RealSkeptic Feb 28 '17 at 15:45

0 Answers0