I dont have any idea help

heloo
this is code for My jframe
i put filemenue but there is problem when i click on menue drop menu is not visible but menue item do work (if u now where the items are )
if you have no idea then is it possible to create 3 different menue and ask action performed to look at their event instead of Jmenue item.
because if i cant find solution then thats my only way
but 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();
i cant see any thing when i press on menu
menue items do work but they are invisible
|_______________________________
|File|
|-------------------------------
now when i press file i cant see any menu item
they do work but not viewable.
tanx

dont look at this question i found my error
i put answer for the people who have same problem
JPopupMenu.setDefaultLightWeightPopupEnabled(false);

Similar Messages

Maybe you are looking for

  • Migrated from 2007 to 2013 - Sharing Calendars broken?

    Issue: User Test1 cannot create calendar items for user Test2 and vice versa, regardless of permisions. No amount of security permissions allow a user to create items on another user's calendar. We've done it the powershell way ((Get-Mailbox) | Forea

  • Page will not load... java was updated and all...

    I need to do an online training course. I was told that my java needed to be updated and it was. When I go to the sight, it opens a new window and shows an icon that the page is loading, but it never does.

  • Magic mouse right click issue

    I just bought the new iMac 3 weeks ago with the magic mouse which I LOVE. But in the past week I have lost the right click function 3 times now. It acts like the right click option is turned off, which I verified and tried to reset and set back which

  • Anyone know how to set file associations for QT in Inno Setup?

    I am working on an app that requires QT to play .smi files and can't seem to get it to work. I was using this code in the Inno Setup file: Root: HKCR; Subkey: ".smi"; ValueType: string; ValueName: ""; ValueData: "QuickTime.smi"; Flags: uninsdeleteval

  • Cannot establish a working VPN connection...period

    I am going nuts. I have been trying to get a vpn connection established for two weeks. I am using a Linksys BEFVP41 router and have tried to connect with Snow Leopard's built-in Cisco ipsec vpn, IPSecuritas, and VPN Tracker. No luck. I'm willing to r