MenuItem doesn't show

Hi!
I got a little problem that I never has seen before. I have a MenuBar with two menus and one MenuItem in each Menu. The problem is when I click a Menu the MenuItems seems to hide behind everything that inside the JFrame since when removed (what's inside the JFrame) I can see the MenuItems.
What can I have done? I have never seen this before.
Thanks in advance
Roland Carlsson

Hi again!
Here comes a part of the sourcecode where I build my JMenuBar and add it to a JFrame
JFrame frame = new JFrame("A Frame");
frame.getContentPane().setLayout(new BorderLayout());
frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
JMenuBar mbar = new JMenuBar();
JMenuItem exitI = new JMenuItem("Exit");
JMenuItem optionsI = new JMenuItem("Options");
JMenu file = new JMenu("File");
file.add(exitI);
JMenu options = new JMenu("Options");
options.add(optionsI);
mbar.add(file);
mbar.add(options);
frame.setJMenuBar(mbar);
Panel p = new Panel();
p.setLayout(new GridLayout(2,3));
Label l = new Label("Name");
p.add(l);
l = new Label("City");
p.add(l);
// An invisible placeholder
l = new Label("");
p.add(l);
final JTextField name = new JTextField(30);
p.add(name);
final JTextField city = new JTextField(30);
p.add(city);
JButton searchButton = new JButton("Search");
// two more panels for center and south. Basically the same way.

Similar Messages

  • SetVisible(true) but doesn't show up

    What I'm trying to do is get the writeAll panel to show up when they click the Write button in the menu. I have it so it's set to invisible after it's created so it only shows up when they click the write button, only it doesn't show up. I've put break statements in and it runs through the writeAll.setVisible(true) but it doesn't change anything on the form. Is there a way to refresh what's being shown? I dont think this is too complicated, but if you need to to weed out my code, please let me know.
    import java.awt.*;
    import java.awt.event.*;
    public class Interface extends Frame implements ActionListener {
        public Label lblwriteFName = new Label("First Name");
        public TextField writeFName = new TextField(12);
        public Label lblwriteLName = new Label("Last Name");
        public TextField writeLName = new TextField(12);
        public Label lblSSN = new Label("Social Security Number");
        public TextField SSN1 = new TextField(3);
        public Label lblSSN1 = new Label("-");
        public TextField SSN2 = new TextField(2);
        public Label lblSSN2 = new Label("-");
        public TextField SSN3 = new TextField(4);
        public Label lblhRate = new Label("Hourly Rate");
        public TextField hRate = new TextField(5);
        public Label lblwDate = new Label("Date");
        public TextField wDate = new TextField(10);
        public Label lblcode = new Label("PayCode");
        public TextField code = new TextField(3);
        public Label lblhours = new Label("Hours Worked");
        public TextField hours = new TextField(2);
        public Panel writeAll = new Panel();
        public Panel firstRow = new Panel();
            public Panel lblfirstRow = new Panel();
        public Panel secondRow = new Panel();
            public Panel lblsecondRow = new Panel();
        public Panel thirdRow = new Panel();
            public Panel lblthirdRow = new Panel();
        public Interface() {
            firstRow.setLayout(new FlowLayout());
            secondRow.setLayout(new FlowLayout());
            thirdRow.setLayout(new FlowLayout());
            writeAll.setLayout(new GridLayout(6,1));
            lblfirstRow.add(lblwriteFName);
            lblfirstRow.add(lblwriteLName);
            firstRow.add(writeFName);
            firstRow.add(writeLName);
            lblsecondRow.add(lblSSN);       
            secondRow.add(SSN1);
            secondRow.add(lblSSN1);
            secondRow.add(SSN2);
            secondRow.add(lblSSN2);
            secondRow.add(SSN3);
            lblthirdRow.add(lblhRate);
            lblthirdRow.add(lblwDate);
            lblthirdRow.add(lblcode);
            lblthirdRow.add(lblhours);
            thirdRow.add(hRate);
            thirdRow.add(wDate);
            thirdRow.add(code);
            thirdRow.add(hours);
            writeAll.add(lblfirstRow);
            writeAll.add(firstRow);
            writeAll.add(lblsecondRow);
            writeAll.add(secondRow);
            writeAll.add(lblthirdRow);
            writeAll.add(thirdRow);
            setLayout(new BorderLayout());
            add(writeAll, BorderLayout.NORTH);
            writeAll.setVisible(false);
            MenuBar mnuBar = new MenuBar();
            Menu mnuFile, mnuOptions;
            MenuItem mnuFileExit, mnuFilePrint, mnuOptionsWrite, mnuOptionsRead, mnuOptionsSummarize;
            setMenuBar(mnuBar);
            mnuFile = new Menu("File", true);
                mnuBar.add(mnuFile);
                mnuFileExit = new MenuItem("Exit");
                mnuFilePrint = new MenuItem("Print");
                    mnuFile.add(mnuFileExit);
                    mnuFile.add(mnuFilePrint);
            mnuOptions = new Menu("Options", true);
                mnuBar.add(mnuOptions);
                mnuOptionsWrite = new MenuItem("Write");
                mnuOptionsRead = new MenuItem("Read");
                mnuOptionsSummarize = new MenuItem("Summarize");
                    mnuOptions.add(mnuOptionsWrite);
                    mnuOptions.add(mnuOptionsRead);
                    mnuOptions.add(mnuOptionsSummarize);   
            mnuFilePrint.addActionListener(this);
                mnuFilePrint.setActionCommand("Print");
            mnuFileExit.addActionListener(this);
                mnuFileExit.setActionCommand("Exit");
            mnuOptionsWrite.addActionListener(this);
                mnuOptionsWrite.setActionCommand("Write");
            mnuOptionsRead.addActionListener(this);
                mnuOptionsRead.setActionCommand("Read");
            mnuOptionsSummarize.addActionListener(this);
                mnuOptionsSummarize.setActionCommand("Summarize");
            addWindowListener(
                new WindowAdapter()
                        public void windowClosing(WindowEvent e)
                            System.exit(0);
        public void actionPerformed(ActionEvent e) {
            String arg = e.getActionCommand();
            if (arg.equals("Exit")) {
                System.exit(0);
            if (arg.equals("Print")) {
            if (arg.equals("Write")) {
                writeData();
            if (arg.equals("Read")) {
            if (arg.equals("Summarize")) {
        public void writeData() {
            writeAll.setVisible(true);
        public static void main(String args[]) {
            Interface interFrame = new Interface();
            interFrame.setBounds(100,100,500,500);
            interFrame.setTitle("Payroll");
            interFrame.setVisible(true);
    }

    make this change in the code
    public void writeData() {
    writeAll.setVisible(true);
    validate();

  • System Tray Program doesn't show a form from the menu

    public SysTrayApp()
    ContextMenu TrayMenu = new ContextMenu();
    TrayMenu.MenuItems.Add("Exit", OnExit);
    TrayMenu.MenuItems.Add("Send Mail", SendMail);
    TrayMenu.MenuItems.Add("Add Exception", AddException);
    TrayIcon.Icon = new Icon(SystemIcons.Application, 40, 40);
    TrayIcon.Text = "RJC Server Services";
    TrayIcon.ContextMenu = TrayMenu;
    TrayIcon.Visible = true;
    NewTimer = new System.Timers.Timer(5 * 60 * 1000);
    NewTimer.Elapsed += NewTimer_Elapsed;
    NewTimer.Start();
    void AddException(Object sender, EventArgs e)
    ExceptionList ExceptionForm = new ExceptionList();
    ExceptionForm.ShowDialog();
    This is the code I am trying to use to show a instance of the Exception form. My application is a system tray application, when right clicked it shows menu items, however clicking the add exception menu item doesn't show the form? I have also tried ExceptionForm.Show()
    to no avail. Any ideas?

    figured it out: ExceptionForm.Visible = true;
    Also I had a long running process on form load that took a while to execute before the form was shown.

  • HT203167 A movie I purchased in the iTunes store is missing. It isn't hidden and doesn't show up in search. I've followed support steps.  Where is it and how do I find it?  I believe I originally purchased the film on my 1st Gen AppleTV.

    A movie I purchased in the iTunes store is missing. It isn't hidden and doesn't show up in search. I've followed support steps.  Where is it and how do I find it?  I believe I originally purchased the film on my 1st Gen AppleTV...other movies show up. Help.

    It was Love Actually. It's been in my library a few years but is now missing. It's odd...it isn't even in the iTunes Store anymore. I think there is a rights issue because a message appeared in the store saying it wasn't available at this time in the U. S. store. Still, if I bought it years ago it should be in my library or I should get a refund....

  • My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more.

    My macbook pro no longer connects to my TV with the mini dvi to hdmi adapter. A while ago the computer fell down and hit the cable. How can I tell if the computer is working ok. Doesn't show mirroring any more. Was working while watching a movie but when I pulled it out from the computer and put it back in the system would no longer mirrorr the screen on the TV.

    The best option is an appointment at an Apple store genius bar.  The evaluation will be for FREE!
    Ciao.

  • My iPod Touch 1G doesn't show up in my iTunes and in My Computer.

    My iPod Touch 1G doesn't show up in my iTunes 10.6.3.25 and in My Computer.
    the iPod can charge when I connect it to the laptop but it doesn't appear in iTunes and My Computer.
    there's also no "apple.." in my universal bus controllers.I cannot sync, what do I do?
    I'm using Windows 7 Home Basic.

    iOS: Device not recognized in iTunes for Windows

  • Tried to install newest itunes, crashed during install, and now crashes my computer every time i try to uninstall.  Itunes doesn't show up in the Add/remove prog list at all.  tried to roll back over a month, still crashing.

    So I tried to update to the newest Itunes.  It locked up my computer part way thru the install.  Black screen, computer turned itself off.  Now anytime i try to do anything with Itunes it shuts my computer down.  I can start up fine in safe mode but when i try to uninstall from there, Itunes doesn't exist.  the other apple programs do, but no itunes.  when i try to uninstall the other programs in safe mode it tells me it can't because the windows installer isn't loaded.  I have system restored to over a month ago and itunes still doesn't show up in add/remove programs.  however, i can open itunes.  it just tells me a file didn't get installed and to uninstall and reinstall.  So, how do i remove a progam that doesn't think it exists and crashes my computer when i try to do anything related to it???  I'm out of ideas.  running windows vista.

    I think my problem is fixed now.
    For the fun of it, I reinstalled iTunes 9.2.1 today (using the exact same installer as I did yesterday), but this time I didn't uninstall iTunes first. As expected, iTunes recognized my iPhone (as I expected it to, until my next reboot).
    A few minutes later, Software Update showed up and among the updates is "iPhone SDK Compatibility Update". The description indicates that installing this should fix an issue where iPhones and iPod touches aren't recognized by iTunes. Isn't that interesting?
    I installed that update and most of the others waiting for me (including Java, Safari 5.0.1, and a few others - not 10.6.4 though, due to the issues with nVidia graphics cards). After the reboot, I started iTunes, and it saw my iPhone!
    So, if you're having this same problem, I'd recommend tracking down this update and see if that does the trick for you. Hopefully it will.

  • BPM console doesn't shows the deployed application in BPM console

    Hi Friends,
    i developed a BPM process in Jdeveloper and deployed in the weblogic server. Enterprise manager shows that application but in BPM workspace doesn't shows that application to initiate the process form BPM console. any one can you please let me know why the weblogic server shows this peculiar behavior?
    Thanks
    Hari Mandadapu

    Did you create an initiator task with corresponding Task Flow within the BPM Project?
    Only when you add an initiator task it will show up in the BPM Workspace.
    An initiator task differs from a regular human workflow task.
    Otherwise you can only start the process from Enterprise Manager or Webservice Call. Check out if the process show up in Enterprise Manager.
    Regards,
    Martien

  • Syncing iphone and can't seem to transfer audiobooks that i have put in a playlist.  Sync menu doesn't show all playlists.  Help

    syncing iphone and can't seem to transfer audiobooks that i have put in a playlist.  Sync menu doesn't show all playlists.  Help

    I have the same problem with podcast playlists.  When I go to the music window in my iPhone devices section, the playlists I have created on my macbook pro in iTunes do not appear as an option to sync with the iPhone.  I know some web radios streams, like the BBC, won't transfer because of compatibility issues, but the playlists of podcasts that I have created consist entirely of podcasts downloaded from the podcasts section on the iTunes Music Store.  They used to show up and sync properly before I upgraded to OS 5.1.1, but now they don't.
    Does anyone have a fix and am I right in surmising that the cause is a glitch in OS 5.1.1?

  • Uploader doesn't show "My Documents" folder

    I am unable to upload a file to the PDF converter service; the uploader doesn't show "My Documents folder..?? Help!!
    Regards,
    Marshall

    Hello Bernd,
    I thought I was getting access to Acrobat. Did I miss something on the Adobe site??
    Marshall Chamberlain authors the Ancestor Series of adventure-thrillers and other suspense-thrillers. He is recognized as an expert in the field of independent publishing. Story summaries and excerpts of his books are available at  <http://www.marshallchamberlain.com/> MarshallChamberlain.com. Please visit his website to discover more about this "above average man," his works, and what's coming next.                                                                               
    Connect with me:         <http://twitter.com/AuthorMarshall> twitter logo at one tenth size         <https://plus.google.com/u/0/105933698392363877165/posts> Google+ Button on tenth size        <http://www.facebook.com/profile.php?ref=profile&id=1240336502> Facebook Button at 14% of size         <http://www.linkedin.com/profile/view?id=23517362&trk=tab_pro> LinkedIn Button 12% of size

  • I updated to yosemite and now if someone is using imessage and sends a text message to my phone it doesn't show up on my phone but does on my computer.  I don't want messages on my computer!  How do I get this to go away and work like it used to?

    I updated to yosemite and now if someone is using imessage and sends a text message to my phone it doesn't show up on my phone but does on my computer.  I don't want messages on my computer!  How do I get this to go away and work like it used to?

    Follow the instructions under the heading "How to unlink a phone number" on this page.

  • How do I delete a movie off my iPhone that doesn't show up in iTunes?

    I purchased this movie on iTunes at least 3 years ago, and both my brother and I recall deleting it. It doesn't show up in my iTunes (therefore I can't sync it on or off), nor my brother's. And I updated my iPhone 4s to iOS 7 a couple of days ago, and I just realised now that I have this movie on my phone, of which no one knows where it has come from. how do I delete it and where would it have come from if it's not on my computer?
    P.S. I only sync my phone on my Mac OS X.

    .  Another strange thing is that in ITunes "Photos" at the bottom where you see the colored visuals of what applications are using space "Other" consumes more than half my space.
    that can sometimes happen, when trying to update the software failed. Then partially downloaded updates will take up a lot of space. Photos synced to iDevices can only be removed by syncing again.
    If syncing again with just one small album with a single photo selected will not remove the synced albums, back up the iPhone to iTunes and restore the device to factory settings:
          iOS: Back up and restore your iOS device with iCloud or iTunes
    Restoring should get rid of the "other" and the synced albums.

  • What do i do when external optical drive doesn't show up in finder?  how can i import software, music, etc. when the drive isn't recognized/mounted/whatever?

    the internal optical drive on my early 2006 20"imac has mechanical problems ejecting discs.  i've gone thru all the recommended steps to eject discs, and have luckily been able to eject the last 3 discs but only after spending 30-60 minutes going thru all of the steps over and over, and today just trying "eject disc" in itunes since i had itunes open.  i don't want to put another disc in - the drive clearly has problems with the mechanical eject mechanism, and from what i've read that's not unique to my computer.
    i bought an external optical drive: lite on, clamshell design to avoid problems with the eject mechanism; i contacted the mfr who said it's mac compatible.
    the drive plays dvds, which is all i've tried so far, but doesn't show up in finder.  so i don't know how to use it to load software, or music, or anything besides watch dvds.
    is there something i can do to get the drive recognized/mounted/whatever?  i would prefer to not spend the $220 which was quoted to me by an authorized mac repair company, even tho i think that's probably a reasonable cost given the delicacy of the operation as shown on ifixit.com. 
    thanks!

    I have an external LaCie burner and it will not show up on my Mac unless I insert a CD or DVD - in that case, the media will show up (I have these settings in the Pref Pane):
    If you want to burn files or music to blank media, you can use Finder or Disk Utility for files, but should use an iTunes playlist/iTunes for music and a movie burn app for videos/movies (such as iDVD, Roxio Toast, Burn, etc).
    If you simply want to drag files over as a backup, an external hard drive is a much better solution than a burner.

  • Movie I Purchased Doesn't Show Up as Purchased

    I have a Movie* in my library that I purchased as a DVD/digital copy combo. In iTunes on my computer, the "Get Info" shows it as "Purchased by:" me with the correct Account Name, so it ought to be something I've "purchased" as far as iTunes is concerned, right?
    But when I go to iTunes from my iPad or Apple TV, it doesn't show up and I can't download it over the air on the iPad and I can't watch it on my Apple TV.
    Is there anything I can do to fix this situation?
    * Thor

    Hello,
    Did you solve this as I have the same problem with 3 films I purchased and would appreciate any help.

  • Songs bought on iMac doesn't show up on Apple TV

    I have a Apple TV (160 gb) and has set it up to sync with my iMac, after the first sync everything in my iMacs library was available to my ATV. But when I've bought a new song on the iMac, it doesn't show up on the ATV. I manually have to sync it to the ATV to get it to work and store it locally on the ATV. Anyone know why my songs are not being shared?

    OK, better late than never... Needed to sync the ATV with my iTunes library for this to happen.

Maybe you are looking for

  • Can't connect to Mac Pro from Macbook Pro on finder

    Hi there was wondering if someone can help me out with this? I used to be able to connect through the side panel on the finder with my macbook to my mac pro and vice versa.  I had not used this function in a few months and tried the other day and it

  • Warning  on use of the 'subtable' keyword

    I have previously given advice on this list about the use of the "subtable" keyword which could lead to kern pairs being unavailable. If you have used this keyword, please review the following. Background. Class pairs in a kern feature are compiled a

  • Problem with the method in JSP

    <%@ method = "doPost" %> ******* if i remove this statement i am getting output but what is wrong with this statement ******** <HTML> <HEAD><TITLE>Hello</TITLE></HEAD> <BODY> <H1> <% if (request.getParameter("name") == null) { %> Hello World <% } els

  • Help, my chart-problem columns

    hello. i used adobe flex build 3.0. Now i had problem about my chart i want to create LineChart. I have date. And my date update  minute by minute. My chart  have 16 spaces : (8h-9h), (9h-10h)....(22h-23h). I want my chart show as the picture blow: O

  • System restore through target disc mode?

    Hi, my 12-inch, very battered powerbook has one foot in the grave and I really really need to revive it. I can feel the hardware working but all i get is a black screen. I have started it as an external hard drive from another mac and I can access ev