Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #2293

Re: menu accelerator

From "Chameleon" <chameleon@THRWHITE.remove-dii-this>
Subject Re: menu accelerator
Message-ID <fad4ot$i7l$1@volcano1.grnet.gr> (permalink)
Newsgroups comp.lang.java.gui
References <76fa6b434bd20@uwe>
Date 2011-04-27 15:38 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
>> I use netbeans.
> 
> Do you use it, or does it use you?
> It's just that it seems to have more control 
> at the moment, than you do.  
> 
> <snip boring crap about your IDE..>
> 
>> How I this possible in Java?
> 
> By learning how to code the Java programming 
> language.  There is a good reference here.
> <http://java.sun.com/docs/books/tutorial/>
> 
>> I try this in my programs MANY times but nothing.
> 
> What 'programs'?  Paste an SSCCE here and we
> might be able to see what you are doing wrong,
> otherwise all I can suggest is "change the dot to 
> a comma in column 47 of line 53" - that *might*
> solve the problem (and if it does, buy a lottery ticket
> quickly - such luck cannot last).
> 
>> So, how the netbeans do this?
> 
> Probably the same way as 'native' Java code.
> 
> Did you even bother checking the Java code that
> your IDE produces?  Or are you just expecting us
> to spoon-feed the information to you?  Information
> that could be obtained by consulting the relevant 
> section of the Java Tutorial, or sometimes even
> the JavaDocs..  

I use netbeans because of real-time syntax checking and refactor things.
I do not use netbeans to generate code.

> .Wait a second, I have to run and get a fork to 
> mash up the potato - suitable for spoon-feeding.

aggressive message!
maybe because my english sucks and you cannot understand what I am 
trying to say.

btw, I am trying to say, how can I assign the "F1" accelerator to a 
menuitem. The following code doesn't work:
---------------------
JMenuBar jmb = new JMenuBar();
JMenu jm = new JMenu("Help");
JMenuItem jmi = new JMenuItem("Help Index");
jmi.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0));
jmi.addActionListener(listener);
jm.add(jmi);
jmb.add(jm);
---------------------
I don't want "Shift+F1", "Ctrl+F1", etc. I want "F1".

Thanks

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

menu accelerator "Chameleon" <chameleon@THRWHITE.remove-dii-this> - 2011-04-27 15:38 +0000
  Re: menu accelerator "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:38 +0000
    Re: menu accelerator "Chameleon" <chameleon@THRWHITE.remove-dii-this> - 2011-04-27 15:38 +0000
      Re: menu accelerator "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:38 +0000
        Re: menu accelerator "Chameleon" <chameleon@THRWHITE.remove-dii-this> - 2011-04-27 15:38 +0000

csiph-web