Menue item is not visible

heloo
this is code for My jframe
i try to put file menu and i put it in but there is problem and drop menue is not visible but it dos work (if u now where the items are )and
if you have no idea then is it possible to create 3 different menue and ask action performed to look at there event instead of Jmenue item.
because if i cant find solution then thats my only way
bu how should i ask for actionPerforme to listen to them.
class ChessMa extends JFrame implements ActionListener {
JMenuItem item;
JMenu m;
JMenuBar bar;
public ChessMa()
{  setTitle("CHESS PLAYER GAME" );
setSize(400,490);
     addWindowListener(new java.awt.event.WindowAdapter() {
     public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
JMenu m= new JMenu ( "File");
m.addActionListener(this);
m.setPopupMenuVisible(true);
item =new JMenuItem("Save");
item.addActionListener(this);
m.add(item);
repaint();
item=new JMenuItem("Load");
item.addActionListener(this);
m.add(item);
JMenuBar bar = new JMenuBar () ;
bar.add(m) ;
setJMenuBar(bar);
public void actionPerformed(ActionEvent e)
     //if (e .getSource() instanceof item)
String arg= e.getActionCommand();
if (arg.equals("Save"))
          { System.out.println("save");}
     else if (arg.equals("Load"))
          {System.out.println("load");}
     else if (arg.equals("File"))
          {System.out.println("���22222222���!!");}
public class ChessMan{
public static void main(String[] args) {
JFrame frame = new ChessMa();
ImageIcon customImageIcon = new ImageIcon("ac516.gif");
          Image customImage = customImageIcon.getImage();
          frame.setIconImage(customImage);
          // Japplet Class
ChessPlayer javaAppletication = new ChessPlayer();
          javaAppletication.init();
javaAppletication.start();
          Container content = frame.getContentPane();
     content.add(javaAppletication, BorderLayout.CENTER);
javaAppletication.setBackground (Color.black);
     frame.setVisible(true);
frame.show();
frame.pack(); // invokes getPreferredSize()
// invokes paint();
}

Hi,
I think you want your file menu to be visible as soon as your frame opens. If I'm correct, then you can run the code pasted below. You were trying to make file menu visible when it was not showing.
Best regards,
Pratap
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class ChessMa extends JFrame implements ActionListener, WindowListener {
     JMenuItem item;
     JMenu m;
     JMenuBar bar;
     public ChessMa()
          setTitle("CHESS PLAYER GAME" );
          setSize(400,490);
          addWindowListener(new java.awt.event.WindowAdapter() {
               public void windowClosing(java.awt.event.WindowEvent e) {
               System.exit(0);
          m= new JMenu ( "File");
          m.addActionListener(this);
          m.setPopupMenuVisible(true);
          item =new JMenuItem("Save");
          item.addActionListener(this);
          m.add(item);
          repaint();
          item=new JMenuItem("Load");
          item.addActionListener(this);
          m.add(item);
          JMenuBar bar = new JMenuBar () ;
          bar.add(m) ;
          setJMenuBar(bar);
          addWindowListener(this);
     public void actionPerformed(ActionEvent e)
          //if (e .getSource() instanceof item)
          String arg= e.getActionCommand();
          if (arg.equals("Save"))
               System.out.println("save");
          else
          if (arg.equals("Load"))
               System.out.println("load");
          else
          if (arg.equals("File"))
               System.out.println("���22222222���!!");
     public static void main(String[] args) {
          ChessMa f = new ChessMa();
          f.setLocation(300,300);
          f.show();
     public void windowOpened(WindowEvent e) {
          m.doClick();
     public void windowClosing(WindowEvent e) {}
     public void windowClosed(WindowEvent e) {}
     public void windowIconified(WindowEvent e) {}
     public void windowDeiconified(WindowEvent e) {}
     public void windowActivated(WindowEvent e) {}
     public void windowDeactivated(WindowEvent e) {}
}

Similar Messages

  • "Hyperion" menu item does not appear in Excel after SmartView Installation

    Hi to all! When I first installed SmartView, everything was ok - "Hyperion" menu item appeared in Excel and I successfully established connection to Planning and worked with data in Excel. Then, once upon a time I happened to select all data through Ctrl+A in the data form open in Excel and tried to copy it to another worksheet in the same workbook, Excel threw out a message about some serious error and informed me that the Hyperion Add-on would be removed. So it was removed in fact. When I was reinstalling Smart-View, all the installation went smoothly but the "Hyperion" menu item did not appear in Excel again. I tried to reinstall both Excel and SmartView and rebooted the system several times but the Hyperion menu item still does not appear in Excel. Can anyone hint me on how to solve this? Thanks a lot in advance!

    Hi, John! Thanks a lot! Your link led me to the thread in which the last post had the link Re: Smart View errors in Excel?! containing the "low-tech" 's instructions. It was these instructions that pulled me from underwater! Thank you so much and to that guy too! :)

  • Work items are not visible  UWL task are visible in tracking in portal

    HI
    Friends
    i  am new from sap Ess/Mss implementation project...
    i am facing an Problem " Work items are not visible under UWL in portal overview page"
    but i am configured  all the ess/mss related things....and also Created for one user for Requester(send Leave Request)...and one more user for App-rover(Apporve an Leave)..
    Requestor send an Leave through portal send it successfully......but i am facing  a problem in uwl under work items are not showing in overview page...but in tracking work items are (Leave request)showing.....work items are not showing in uwl TASK(VERY PROBLEM)...
    i am configured and also registered UWL IN PORTAL..it is good..
    in sap ecc i can assigned UWL_SERVICE user to roles
    1.SAP_BC_BMT_WFM_UWL_ADMIN    
    2.SAP_BC_BMT_WFM_UWL_END_USER
    3.SAP_BC_ADMIN_USER
    4.SAP_BC_UWL_SERVICE
    PLEASE HELP ME.
    Tanks
    Shaik Rafi

    Hi All,
    In such cases, please try to check as below :
    1) Create Leave request work item from Employee and check the same under the UWL Tracking tab of employee.
    2) Log-in to swi5 transaction of the respective back end system and give "US" -> manager's UserID -> Choose Tasks to be completed from the drop down -> Remove any date if mentioned -> Execute.
    3) Here if you can see the Leave request created, but not on the portal, it reflects some portal issue like sync.
    4) If no leave request work item is seen here, then there is a problem in the employee manager mapping or the workflow setup.
    5) In such cases, you can try to check the Swi1 and check the log of that workflow to understand the current status of the Leave request.
    Revert if further help is needed with more info.
    Reward points if found useful.
    Regards,
    Shri vidya S

  • JNLP related-content issue in JRE 7u5 Sub Menu Item link not working

    we are having an issue with our existing Web Start Application in Java Version 7 Update 2 and above where the Sub Menu items are not being associated with Internet Explorer with href link as Target when using <related-content> tag in JNLP. This is working fine in JRE 1.6, JRE 1.7.0 and 1.7.1. I have tried using Integration Service to programatically create these shortcuts in JRE 1.7.5 but was unsuccessful.
    <jnlp spec="6.0+" codebase="http://..." href="xyz.jnlp">
    <information>
    <title>ABC</title>
    <vendor>ABC Vendor</vendor>
    <homepage href=""/>
    <description>ABC Desc</description>
    <description kind="short">ABC Desc Short</description>
    <icon href="abc.gif" kind="default"/>
    <offline-allowed/>
    <shortcut online="true" install="true">
    <desktop/>
    <menu submenu="ABC"/>
    </shortcut>
    <related-content href="help.doc">
    <title>ABC Help</title>
    <icon href="help.gif"/>
    </related-content>
    <related-content href="Uninstall.html">
    <title>Uninstall Page</title>
    <icon href="uninstall.gif"/>
    </related-content>
    </information>
    <security>
    <all-permissions/>
    </security>
    <update check="timeout" policy="always"/>
    <resources>
    <java initial-heap-size="128m" max-heap-size="256m" version="1.6+"/>
    <jar href="ABC.jar" download="eager" main="true"/>
    </resources>
    <application-desc main-class="com.main.Abc"/>
    </jnlp>
    Any help in this regard would be greatly appreciated.

    I haven't filed this as a bug in Java development yet but am going to do so soon, In the mean time i was hoping to see if anyone else is on the same boat as me and if there was a work around.

  • Movie menu item no longer visible

    The movie item is no longer visible on the menu bar.  Internet, Computer and General are all there.  Everything works including access to YouTube.  Just the movie rental item is not longer there.  Any ideas?

    .....this problem is known and is fixed easily but making changes to the network config.  I was hoping someone knew about that.
    Most network issues are as a result of interference, with a lesser number being as a result of set up, you could try using another wifi channel for your network if the problem reoccurs at regular intervals after restarting your equipment.

  • Open PO item is not visible in MD04

    Dear Expert,
    We have one scenario that one PO contain 3 line item which having Open PO Qty. but for line item 20 we have completed open qty i.e.40 & PR is also there. but it is not showing in MD04 & Also not visible in MIGO while doing GR
    so please suggest what we need to do this will be visible.
    Regards,
    Ishwar

    Dear Subhash,
    Thanks for your reply
    Status of line item is OPEN
    Changes has been done in PO & also Version is set with Completed Indicator
    Plz suggest
    Regards,
    Ishwar

  • All my sent items are not visible in outlook

    When I send email from my iphone I can't see it in sent items in my desktop pc's outlook 2013. However, all inbox items are visible. My OS is windows 8 pro.
    Thanks

    Looking at the .mac mail folder, there are no black triangles, I have inbox, drafts and sent (and trash) icons.
    I tested the .mac mail (I know I keep saying "this site" but I don't know what else to call it?), and using this one it does keep a copy of the sent items. BUT using the Mail (the stamp icon mail) copies of sent items are not saved.
    I want to use the Mail one, because you can choose fonts and all that other stuff, which is why I even purchased the year membership! (otherwise I would just stay with Yahoo mail).
    I really don't have a clue about this stuff and I appreciate you taking your time here.

  • I just downloaded Firefox 4 and it does NOT look like it is supposed to look - My menu items are not in a single button, etc... as displayed in Step 2 of getting to know your browser on the welcome page for Mozilla Firefox 4. Can anyone help?

    This webpage [http://example.com http://www.mozilla.com/en-US/firefox/central/ ]shows what Firefox 4 should look like. My Firefox 4 does not have the menu items grouped and I have no app tab. All in all, my Firefox 4 is not what it should be... does anyone know why this might be and how I should go about fixing it? thanks :)

    To get the new UI you need to hide the menu bar. To do that in the View menu select Toolbars, then click on the "Menu Bar" entry.
    If you need access to the menus you can press either Alt or F10 to temporarily display them.

  • Windows and icons are black, menu items are not showing correctly

    Hello!
    Well just doing my normal routine today browsing the Internet, watching videos on vlc, my computer suddenly started to glitch. Icons were disappearing, Safari turned black.
    So i did a restart but the problem is still there. I cant even choose the user properly because the avatars are not there it's just all dark gray. Remembering where my user avatar is, i do a click and type in my password and I do and able to get in to my system but all windows menu items and icons are black.
    Basically what I'm saying is the system seems to be working fine except for that I can't see the icons and windows properly displayed.
    I've already tried to reinstall of Mavericks hoping that it's a software thing. You guys think it's a problem with the graphic processor?
    Any help or suggestions will be appreciated thank you.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It changes nothing, and therefore will not, in itself, solve your problem.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The procedure will help identify which such modifications you've installed, as well as certain other aspects of the configuration that may have a bearing on the problem. Don’t be alarmed by the apparent complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode, if possible. If you’re now running in safe mode, reboot as usual before continuing. If you can only boot in safe mode, you can still use this procedure, but not all of it will work. Be sure to mention that in your reply, if you haven't already done so. 
    Below are instructions to enter UNIX shell commands. The commands are safe and do nothing but produce human-readable text output, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. I am not asking you to trust me. If you can't satisfy yourself that these instructions are safe, don't follow them.
    The commands will line-wrap or scroll in your browser, but each one is really just a single long line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it.
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. Step 1 should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply.
    Launch the Terminal 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 Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    { echo "Loaded kernel extensions:"; kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'; echo $'\n'"Loaded user agents:"; launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)|\.[0-9]+$/{print $3}'; echo $'\n'"Inserted libraries:"; launchctl getenv DYLD_INSERT_LIBRARIES; echo $'\n'"User cron tasks:"; crontab -l; echo $'\n'"System launchd configuration:"; cat /e*/lau*; echo $'\n'"User launchd configuration:"; cat .lau*; echo $'\n'"Login items:"; osascript -e 'tell application "System Events" to get name of login items' | sed $'s/, /\\\n/g'; echo $'\n'"Safari extensions:"; /usr/libexec/PlistBuddy -c Print L*/Saf*/*/E*.plist | awk -F'= ' '/Bundl/{print $2}' | sed 's/\..*$//;s/-[1-9]$//'; printf "\nRestricted user files: %s\n" $(find ~ $TMPDIR.. \( -flags +sappnd,schg,uappnd,uchg -o ! -user $UID -o ! -perm -600 \) | wc -l); echo $'\n'"Extrinsic loadable bundles:"; cd; find -L /S*/L*/E* {,/}L*/{Ad,Compon,Ex,In,Keyb,Mail/Bu,P*P,Qu,Scripti,Servi,Spo}* -type d -name Contents -prune | while read d; do /usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$d/Info.plist" | egrep -qv "^com\.apple\.[^x]|Accusys|ArcMSR|ATTO|HDPro|HighPoint|driver\.stex|hp-fax|JMicron|print|SoftRAID" && echo ${d%/Contents}; done; echo $'\n'"Unsigned shared libraries:"; find /u*/{,*/}lib -type f -exec sh -c 'file -b $1 | grep -qw shared && ! codesign -v $1' {} {} \; -print; echo; ls -A {,/}L*/{La,Priv,Sta}* L*/Fonts; } 2> /dev/null | open -ef
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    The command may take up to a few minutes to run, depending on how many files you have and the speed of the computer. A TextEdit window will open with the output. Post the contents of the TextEdit window (not the Terminal window) — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Remember that you must be logged in as an administrator for this step. Do as in Step 1 with this line:
    { echo "Loaded system agents:"; sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo $'\n'"Login hook:"; sudo defaults read com.apple.loginwindow LoginHook; echo $'\n'"Root cron tasks:"; sudo crontab -l; echo $'\n'"Log check:"; syslog -k Sender kernel -k Message CReq 'GPU |hfs: Ru|I/O e|find tok|n Cause: -|NVDA\(|pagin|timed? ?o' | tail | awk '/:/{$4=""; print}'; } 2> /dev/null | open -ef
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    You can then quit Terminal.
    To prevent confusion, I'll repeat: When you type your password in the Terminal window, you won't see what you're typing.
    Note: If you don’t have a login password, set one before taking Step 2. If that’s not possible, skip the step.
    Important: If any personal information, such as your name or email address, appears in the output of these commands, anonymize it before posting. Usually that won't be necessary.
    Remember, Steps 1 and 2 are all copy-and-paste — no typing, except your password. Also remember to post the output as text, not as a screenshot.
    Please post the contents of the TextEdit window, not the Terminal window.

  • ListBox Items sometimes not visible on app Resume

    Hey,
    I have a winRT windowsphone 8.1 app in development and I've come across a strange problem sometimes.
    Basically, when my app loads, I pull items from an RSS using syndication feed, store to a data set which is binded to the listbox. This works perfectly.
    I can even hold the back button, terminate the app, then reload it and the items repopulate instantly (guessing the app automatically saves state? I didn't program this in) but occasionally, the listbox is empty. Or so I think, turns out the items are still
    loaded; I tap the blank screen and an article shows up, I can still even scroll up and down this blank space, tap other blank areas and different articles from that feed load. So clearly the listbox is still populated, Just not visible.
    Does anyone know what causes this? Any advice on what I need to be doing here? Can provide code if required.

    Alright so I worked out part of the problem. The reason it wasnt working on navigating back sometimes is that parts of the code for initialising the listBox resided in the constructor, and not "onnavigatedto". Moving the code into that method fixed
    the issue when navigating back pages.
    However, the problem still remains on physically closing the app (swiping it away in multitask view). When the app is loaded again, the listbox is blank, but operable (the feed is clearly loaded as selecting the blank screen opens articles). It seems that
    this doesnt occur if I change the "bypasscahceonretreive" property on the syndicatedfeed to "true", but if i set this that means the page will always bypasscache when navigated back to it, i dont want this (waste of quota) so i still need
    to fix that one.
    Im thinking i may need to implement proper resuming when the app is "closedbyuser"? So add an "onloaded" handler, and it the app was closed by user then just bypass the cache and itll probably work (again, not ideal, as id be happy for
    it to use the cache).
    Does this sound like the correct behaviour?
    EDIT:
    I had to do this. It worked, but wasnt ideal. So i bypassed cache on app first load and now it always shows up. weird.

  • Work items are not visible under UWL in portal ?

    Hi,
    We are upgrading from SRM 5.0 to SRM 7.0.
    We have observed one issue here. Workitems are not visible in UWL in portal.
    But workitems are available in SAP inbox. i.e SBWP.
    Completed items we can see in UWL.
    Could you please let me know any idea on this.
    Regards
    Venkatesh P
    Edited by: Venkatesh Padarti on Dec 9, 2010 8:28 AM
    Edited by: Venkatesh Padarti on Dec 9, 2010 8:29 AM

    Hi Venkatesh,
    Can you please share the solution? Which base URL was wrong and where did you correct that?
    Your help is really appreciated.
    I had post the same question at SRM workflow - work Item is not being displayed If you want to reply there. I will definitely, reward with points too.
    Thanks,
    Bhavik

  • New item category not visible in CRM WebUI

    Hi,
    I am working on CRM 7.0, Leasing Contracts component BT114H_LAM.
    I created a new item category for the contract however this is not visible in the WebUI screen. the moment i enter the item it dissappears from the screen. It is available in the item details.
    Same item is visible in the Backeng SAP GUI.
    Can anyone suggest some solution for the same.
    I have done all the customizing required for the new item category in SPRO-Financial Services->Basic Functions->User Interfaces->CRM Web client UI
    Waiting for some quick reply
    Regards,
    PP

    Thanks fo ryour input.
    There was somethng else that was missing from customizing.
    regards,
    PP

  • Menu bar is not visible, but neither is Full Screen mode button. How do I fix this?

    While I am in Firefox, it appears that I am in Full Screen mode, as my Menu Bar is missing while in the application, but when I looked up how to troubleshoot, it told me to click on the Full Screen mode button (with diagonal arrows) but it is not visible anywhere in my browser. How else can I get out of Full Screen mode? Thank you!

    On Mac you can use: command+Shift+F

  • Menu item icon not updating

    Hi,
    I have an action into which I set an Icon:
    action.putValue(Action.SMALL_ICON, icon1);
    now I set this action into my menu item and show the item in a menu. The item displays correctly and the icon is visible.
    later in the program i do:
    action.putValue(Action.SMALL_ICON, icon2);
    then I open the menu but the menu item still shows icon1 until I roll over it with the cursor when it finally changes to icon2.
    Any ideas on how to make this update immediate?
    BTW at the point of changing the icon, I don't have access to the menu item or the frame etc, just the action.
    Thanks a lot,
    Jim

    Anyone got any more ideas?Maybe you have a programming problem, but we can't see your code so we don't know for sure.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • "Send link..." context menu item does not launch the mail client

    This was working in Firefox 12 but with the latest update to Firefox 13.x no mail client is launched (mine is Thunderbird) when context menu item "Send link..." is clicked.
    '''I have tried this with all addons disabled''' but the same problem is occurring.
    Does it happen for you? If not, how could I solve it?
    I will report as a bug if others have this problem.
    Thanks.

    I changed the network.protocol-handler.external.mailto setting in about:config to the default value (true) and that seemed to fix it.
    I don't know what changed it before though.

Maybe you are looking for

  • GetVariableData() in Java Embedding Activity

    In Oracle BPEL PM 10.1.3, getVariableData() method now returns 'oracle.xml.parser.v2.XMLElement' instead of the usual DOM element. String input = ((XMLElement)getVariableData("inputVariable","payload","/ns1:input")).getNodeValue(); The above code sni

  • Track pad wont click and drag help?

    this may not be the right place but for some reason my track pad just randomly quit working when it comes to click and drag. i updated the software because i read one correct this issue but its still happening. can anyone help? do i need to take it t

  • Setting a DataProvider to a custom itemRenderer in a DataGrid

    Hi, I've got a DataGrid, with one column using a custom AS itemRenderer to display a ComboBox.  Everything works, but there are various "wierd" behaviors occuring (when I remove a row, the ComboBox of the next row in line resets to it's label, but no

  • Is it possible to convert/compare  a JUCtrlAttrsBinding to a number in EL?

    Using 10.1.2 JDev - I am trying to do the following in order to have a binding value control the max length of an input field in a JSP:           <c:choose>             <c:when test="${bindings.MyFieldMaxLength gt 60}">               <c:set var="txtL

  • Measure HYTD - negative figures

    Hi everyone, We implemented the measure HYTD by adding the members in the TIME dimension with the properties as the others members. The level is HALFYEAR. After processing, we can see in BPC excel the measure HYTD, it seems ok. Now if we use it on al