No buttons showing

Hello everyone, im new to java and I would be greaful for your help:
My problem is this: my swing app doesn't show the JMenuBar, can any one point me in the direction in where im going wrong?
import java.awt.*;
import java.awt.Event.*;
import javax.swing.*;
import javax.xml.transform.Source;
public class main extends simpleFrame{
     private shape squareShape;
     private frame aFrame;
      * Menu buttons
     public JMenuBar menuBar = new JMenuBar();
     public JMenu file = new JMenu("File");
     public JMenuItem start = new JMenuItem("Start");
     public static void main(String[] args)
          main game1 = new main();
          game1.showIt("Title");
     public void gridLayout()
          Source[][] mySpace = new Source[20][20];
     public void main()
          squareShape = new shape(); // makes a new sqaure
          this.setJMenuBar(menuBar);
          menuBar.add(file);
          file.add(start);
          this.getContentPane().add(aFrame);
          pack();
     public void score()
          //to do
}Thank you

can any one point me in the direction in where im going wrong?Well your code isn't complete, so I'm not going to spend time guessing what the rest of it looks like. For example:
a) you reference a method showIt(), but its not included
b) you included a method main() where you attempt to add the menu to the frame, but you never invoke that method from anywhere.
Also, learn the Java coding conventions. For example class names are upper cased. (ie. main should be Main, simpleFrame should be SimpleFrame)
The best I can do is point you to the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html]How to Use Menus which has working examples.
I suggest you download the entire tutorial from here:
http://java.sun.com/docs/books/tutorial/

Similar Messages

  • I cannot delete pictures from ipod as there is no delete button showing, I cannot delete pictures from ipod as there is no delete button showing

    I Cannot delete the pictures from my ipod, there is not a delete button showing on the screen only Share , copy, or print could you please help me

    You need to resync with iTunes. Unselect photos in iPhoto you don't want anymore.  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G + 120G OCZ Vertex 3 SSD Boot HD 

  • Just bought a nano and want to download some of my iTunes library. The "Music" button shows almost all my selections but some albums are missing, yet thos albums appear on the nano icon on my desktop but none of the others. What's happening?

    Just bought a nano and want to download some of my iTunes library. The "Music" button shows almost all my selections but some albums are missing, yet ONLY those albums appear on the nano icon on my desktop after being dragged there but none of the others. What's happening?
    I've read some of the post here that I thought might help but they refer to titles (Music) and triangles in the "Devices" window which are nowhere to be seen when I open the "Devices" window.
    I have iTunes 11.0.3 and Mac OS 10.6.8. Does this make a difference?

    I should mention that, for the first problem, I do make sure that my new tracks are stored in the folder where I told iTunes that my music is in. Also, when I say the cataloging of my library stops short of cataloging all my songs, I have tried leaving the computer unattended for days (my computer's sleep mode is disabled). It always stops before cataloging all of my music regardless of whether I am doing something else while iTunes is cataloging, or if I just let iTunes be the only program that's open during the cataloging process.

  • How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain

    How does this happen: The picture of recent apps you get when double clicking the home button showed in Settings-Wifi that I had been connected to a network I have not been near for two months. Its not a recent "image" of Settings-Wifi. Can anyone explain?

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • Buttons showing up in .pdf files

    Is there a problem in Reports 6i displaying a button in a .pdf? It keeps bombing out when I try to have a button in my report.
    Thanks!!!!

    Kris,
    I think Danny has already answered your question. When you generate a report with a button to PDF, the button shows up
    only as static image. What you can do is set the hyperlink property of the button. On the generated PDF, the button's image
    will serve as a link now. To be able to drill down this way, you can specify a link for a CGI request in the hyperlink property.

  • Could 'export button' show only pdf, and excel only?

    Hai,
    I am using report viewer, it has export button in that header.
    Could 'export button' show only pdf, and excel only?
    So the report just only export pdf only or excel only.
    Technology:
    Asp.net Vs2010
    SSRS2012
    Windows 7

    I found the solution:
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/74dad27b-ef7e-4b9b-8922-666b317b3094
    This is the additional code, to hide all type of export.
                DisableUnwantedExportFormat((ReportViewer)sender, "XML");
                DisableUnwantedExportFormat((ReportViewer)sender, "CSV");
                DisableUnwantedExportFormat((ReportViewer)sender, "IMAGE");
                DisableUnwantedExportFormat((ReportViewer)sender, "PDF");
                DisableUnwantedExportFormat((ReportViewer)sender, "MHTML");
                DisableUnwantedExportFormat((ReportViewer)sender, "EXCELOPENXML");
                DisableUnwantedExportFormat((ReportViewer)sender, "WORDOPENXML");

  • No Invite Users button showing up

    Got my site registered and ready to edit - but there is no
    "invite" end users button showing up on my admin panel. Where is
    it???
    thanks

    Hello Barbara,
    When you login to
    http://incontextediting.adobe.com,
    click View All Websites, then click on your website name in the
    list. The Invite User button will appear in the upper right hand
    side of the page.
    Best regards,
    Corey

  • Why do show/hide buttons show when PDF is opened?

    I've created an interactive PDF with a series of show/hide buttons with rollover actions. When I export and open the PDF, some of the target buttons show up. If I mouseover, they correct themselves and go to their correct hidden state until I mouseover. Is this a bug and is there any way to keep them hidden from the start? Note that the target buttons overlap some, and I'm wondering if that is part of the problem so I'll test that, although not having them overlap isn't a viable solution.
    Thanks!

    Thanks for the response. Hidden until triggered was checked. I rebuilt the buttons and they seem to work fine now. It seems like InDesign is very finicky about the order of operations.

  • New loaded apps are working but the app button shows only grey - please help

    New loaded apps are working but the app button shows only grey - please help...I have this problem since 3 days ago. I have synchronized and restart my iPad but the matter didn't changed

    well in thatcase, i need another help .
    thanks for your instant reply.
    i have currently bought a new laptop (windows 8) and my iphone is not being recognized by itunes.
    because i have no backup on my previous laptop, i downloaded touchcopy but even touch copy is not recognizing my iphone.

  • HT202159 I was downloading a app from the app store and it downloaded about 85% then gave an error message download failed but when I reopen the app store to the purchases the resume button show but when i click it the same error comes up failed to downlo

    I was downloading a app from the app store and it downloaded about 85% then gave an error message download failed but when I reopen the app store to the purchases the resume button show but when i click it the same error comes up failed to download

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Select
    /var/log ▹ install.log
    from the hierarchical list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar. Then select the messages from the last installation or update attempt, starting from the time when you initiated it. If you're not sure when that was, start over and note the time. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Edit it out by search-and-replace in a text editor before posting.

  • Guys I have a iPod Touch 4g with iOs 4.3.3... I want portrait orientation lock button back... I miss it a lot... A dumb mute button shows instead of it... I hate it... Is there anyway I can get d PO lock button back? Any method?? Pleaaaaaaase help me guys

    Guys I have a iPod Touch 4g with iOs 4.3.3... I want portrait orientation lock button back... I miss it a lot... A dumb mute button shows instead of it... I hate it... Is there anyway I can get d PO lock button back? Any method?? Pleaaaaaaase help me guys

    You can inform Apple of your displeasure:
    Apple - iPod touch - Feedback
    That is all.

  • No Edit buttons showing

    I am able to log into a managed site OK but no Editing buttons show up. Any help please?

    Thanks for doing that.
    I can now get in and the buttons are now visible however when I make change sit won’t let me save them.
    See screen shot below
    Regards  Kevin
    Kevin Goddard ( 07831 558555 ( 01372 460711
    <mailto:[email protected]> [email protected]

  • Flash button shows through Flash Menu

    I am using a third party product that has a Flash drop down menu.  In DreamWeaver, I added a Flash button on the page.  When I activate the drop-down menu, the Flash button shows through the Flash drop down menu.  How can I fix this so that the menu covers up the button?  I've tried z-index property but that did not work.

    Flash rises to the top.  See this article on wmode parameter
    http://www.communitymx.com/content/article.cfm?cid=e5141
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Since last update I do not have a "delete" button showing on a toolbar. Therefore, I cannot delete emails without opening them. Please help.

    Since last update I do not have a "delete" button showing on a toolbar. Therefore, I cannot delete emails without opening them. Please help.

    Ask Apple to re-enable it. I had an unauthorized purchase last October. They disabled my account until the problem was solved. However, I asked them to reopen it, and they just asked me to provide some security information (billing address, a recent purchase you made, etc.), and then they re-enabled it.

  • Normal State Button Shows Selected State At Loop Point

    My menu shows the Normal State Button Shows as the selected state At Loop Point. I want it to show for instance black until it is selected then "rollover" to red. TIA for any help.
    Murman

    There are two ways that you can do this without resorting to using a layer based shape or a layer based menu.
    First, you need to decide if it is important for the logo to appear in full colour or if you can get away with a single colour instance of it appearing. If the answer to this is that a single colour is OK, then use a standard overlay menu. Otehrwise, try using a masked overlay menu (there are limitations...)
    With a standard overlay, the background image is as you want it to appear without anything selected - all shapes and text, etc, should be in place as if no button is chosen.
    You then create the overlay, which is a simple .pict file that is the size of the menu. On this you simply place as many instances of the logo as you need - create them in black or grayscale and don't add anything else. The overlay will be mostly white with the black or gray shapes on it.
    Add this to your menu in DVDSP and drag out the button rectangles to cover the background text and the overlay shape. When the button is selected, the logo shape will show up, but will not show in the normal state.
    You can get the logo to be whatever colour you need by using the colour mapping within the property inspector for the button.
    If you definitley need a full colour logo to appear, you can either use a layer based photoshop menu, or use overlay masks:
    http://www.editorsbin.com/authoring/mask_overlay.html
    be aware that there are some limitations when using the masking technique - but all is explained in that tutorial.

  • Phantom Done Button Showing up on all front screens

    I have this phantom "done" button showing up on my 3 screens when I'm not in anything else.  How do I get this off?  I just purchased the iphone 5 yesterday.

    Try restarting your iPhone.
    You may also want to try changing the Wallpaper from Settings > Brightness & Wallpaper.

Maybe you are looking for

  • Keyboard shortcuts cleared after updating to ios 8.0.2

    After updating my iPhone 6 from IOS8 to IOS 8.0.2, the keyboard shortcuts have been cleared out.  I've tried to reset the Keyboard Dictionary but no change.

  • Out of Memeory Error

    Hi All, My application is RMI based running in JDK .1.3.1_12 And JRE 1.3.1_09, Server is Windows 2000, 6GB RAM. Four different RMI services are running. 2 services are configured as JVM heap size intial memory as 1100 Mb and Max mem as 1600 Mb. Remai

  • Convert from java file to cap file

    Dear Pro, Please help me this problem, I'm building a applet in eclipse. Now, I want to convert from java file to cap file to load it into javacard. I need repair what tools and do what, please help me! Thanks & Best Regards, KeillyNguyen

  • ITunes cannot run because some of it's required files are missing. Please reinstall.

    I've tried it 5 times and reinstalled quick time. I have a very old windows xp pc. Please help me. I don't know what to do.

  • JMS Listener Bug??

    I am implementing SIM 7.0 and have enabled a JMS Listener resource. The resource works well and we have no issues with it. The problem is when you try to edit the Synchronization policy for the JMS Listener and then cancel it without saving i.e. 1. S