Newbie problem

  • Roque Campos

    Roque Campos - 2009-04-29

    Dear Friends:

    First I've to request apologizes about my bad English.

    I'm trying to use OpenSwing in an non MDI proyect. Just a swing JFrame with a grid binded to a database table.

    I follow all the steps of the tutorial, but I have a lot of questions, and finally, my test does not work :(

    First: As my proyect is a non MDI proyect, is it necesary to implement the MDI Controller in my main class (it is a simple JFrame)? I suppose that the answer is yes, but, I don't understand why, because I don't wan't an MDI app, just a simple Jframe...

    Second: After creating the ClientSettings object, and the grid control, and the grid controller, when I run my proyect and mi JFrame is made visible, the following exception happens:

    java.lang.NoSuchFieldError: MDI_FRAME_DECORATED
            at org.openswing.swing.mdi.client.MDIFrame.<clinit>(

    I suppose that this is related with the fact that I'm not using and MDIFrame, but I don't understand how can this be done.

    Is there a simple tutorial on how to add a Grid to a simple JFrame (without using MDI style)?

    Thank you in advance

    R. Campos.

    • mcarniel

      mcarniel - 2009-05-09

      OpenSwing framework is composed of several packages: each one contains classes related to the same topic.
      For instance, "org.openswing.swing.mdi.client" package contains all classes related MDI environment provided by OpenSwing: it includes both MDIFrame and MDIController classes; this one must be used only in combination with MDIFrame.

      So you have not to use MDIController with a JFrame!

      OpenSwing distribution includes a lot of sample applications that show how to use OpenSwing components, both with and without MDIFrame. See for instance demo3 and demo4 sample applications.

      However, before creating posts on this site you should read and study documentation provided in this web site!


Log in to post a comment.