Strange JMenuBar problem

Discussion in 'Java' started by bucky.pope, Sep 29, 2008.

  1. bucky.pope

    bucky.pope Guest

    I've been developing with Eclipse Europa. I have a dialog with a
    JMenuBar. When I test under Eclipse, the menu items are visible on the
    bar. However, when I generate a jar file, the menu items are no longer
    visible -- but the menu items are there because if I click in the
    right spot, I get the correct response.

    This has worked in the past. About a week ago, I created another jar
    that I distributed which had no problems for me or my testers. I have
    menus on other frames that work with no problem.

    I've tried different jre's and compatibility settings. I've tried
    changing the opacity of the menu items and the menu bar. I've tried
    setting the foreground on the menu items. None of this works.

    What's strange is executing under Eclipse works fine, generating a jar
    does not. Everything else in the application seems to be working fine.

    Any ideas about what could be different when executing from Eclipse
    and from a jar?
    bucky.pope, Sep 29, 2008
    #1
    1. Advertising

  2. bucky.pope schrieb:
    > I've been developing with Eclipse Europa. I have a dialog with a
    > JMenuBar. When I test under Eclipse, the menu items are visible on the
    > bar. However, when I generate a jar file, the menu items are no longer
    > visible -- but the menu items are there because if I click in the
    > right spot, I get the correct response.
    >
    > This has worked in the past. About a week ago, I created another jar
    > that I distributed which had no problems for me or my testers. I have
    > menus on other frames that work with no problem.
    >
    > I've tried different jre's and compatibility settings. I've tried
    > changing the opacity of the menu items and the menu bar. I've tried
    > setting the foreground on the menu items. None of this works.
    >
    > What's strange is executing under Eclipse works fine, generating a jar
    > does not. Everything else in the application seems to be working fine.
    >
    > Any ideas about what could be different when executing from Eclipse
    > and from a jar?


    My guess, there is an Exception thrown somewhere. Open the java console while
    running/starting the jar and see whether you get an Exception.
    Stefan Rybacki, Sep 29, 2008
    #2
    1. Advertising

  3. On Sep 29, 3:14 pm, "bucky.pope" <> wrote:
    > I've been developing with Eclipse Europa. I have a dialog with a
    > JMenuBar. When I test under Eclipse, the menu items are visible on the
    > bar. However, when I generate a jar file, the menu items are no longer
    > visible -- but the menu items are there because if I click in the
    > right spot, I get the correct response.
    >
    > This has worked in the past. About a week ago, I created another jar
    > that I distributed which had no problems for me or my testers. I have
    > menus on other frames that work with no problem.
    >
    > I've tried different jre's and compatibility settings. I've tried
    > changing the opacity of the menu items and the menu bar. I've tried
    > setting the foreground on the menu items. None of this works.
    >
    > What's strange is executing under Eclipse works fine, generating a jar
    > does not. Everything else in the application seems to be working fine.
    >
    > Any ideas about what could be different when executing from Eclipse
    > and from a jar?


    Does any logic retrieve any resources from the JAR(s)? If so, then
    that may be the point of failure.

    For things like this, liberally sprinkling your code with asserts can
    be a real time saver.
    softwarepearls_com, Sep 29, 2008
    #3
    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. Simon Niederberger

    Handle JMenuBar with visible glass pane

    Simon Niederberger, May 18, 2004, in forum: Java
    Replies:
    2
    Views:
    1,031
  2. Ajay

    JMenuBar and JPanel

    Ajay, Sep 23, 2005, in forum: Java
    Replies:
    1
    Views:
    15,628
  3. Replies:
    0
    Views:
    383
  4. Jason Cavett

    Add Listeners to JMenuBar

    Jason Cavett, Oct 4, 2006, in forum: Java
    Replies:
    1
    Views:
    1,403
    Shawn
    Oct 4, 2006
  5. Big - Goofy

    JInternalFrame and JMenuBar

    Big - Goofy, Jan 28, 2007, in forum: Java
    Replies:
    8
    Views:
    1,093
    Andrew Thompson
    Jan 30, 2007
Loading...

Share This Page