JMenuItem's hotkey (accelerator) alignment

Hi guys,
How to force all JMenuItem's hotkeys (that are menu items accelerators) be aligned to the right equally for all hotkeys?
I am about JMenuItem.setAccelerator(...) - how to force ALL THE hotkeys for a menu to be aligned equally to the right?
Thanks in advance.

[http://docstore.mik.ua/orelly/java-ent/jfc/ch03_08.htm]
[http://onjava.com/pub/a/onjava/excerpt/swing_14/index3.html]

Similar Messages

  • JMenuItem text doesn't align properly

    Please look at the code below:
    import javax.swing.*;
    import java.awt.*;
    public class TestJMenuItem extends JFrame {
        public TestJMenuItem() {
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JMenuBar jmb = new JMenuBar();
            JMenu jm = new JMenu("File");
            JMenuItem jmi = new JMenuItem("New");
            jmi.setMaximumSize(new Dimension(80, 30));
            jmi.setMinimumSize(new Dimension(80, 30));
            jmi.setPreferredSize(new Dimension(80, 30));
            jmi.setHorizontalAlignment(SwingConstants.RIGHT);
            jm.add(jmi);
            jmb.add(jm);
            setJMenuBar(jmb);
            pack();
            setSize(new Dimension(400, 400));
            setVisible(true);
        public static void main(String[] args) {
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    TestJMenuItem tjmi = new TestJMenuItem();
    }If you click on "File" menu item, the "New" JMenuItem text seems to go out of the menu item's boudaries. As you can see, I've set the alignment to SwingConstants.RIGHTSetting it to SwingConstants.LEFT leaves a lot of gap from the left edge of the menu item. What am I doing wrong here?
    Thanks,
    Peeyush Garg

    multi-post: http://forum.java.sun.com/thread.jspa?threadID=5143917&tstart=0

  • JMenuItem icon/Text verticle alignment question

    hello,
    can some one help with my question:
    I got 5 JMenuItems in a JMenu, some JMenuItems have icon, some not, I want to align them with icon and text in a neat format, like those in Sun's Forte IDE's Menu:
    but I can only do it like this:
    icon1 open..
    save As..
    icon2 new..
    Exit..
    (above each line represent a JMenuItem, I need to make "save as" ,"Exit" to in line with "open" and "new" in verticle direction,NOT with the icon)
    sb suggest always set an icon for each JMenuItem, set an transparent Icon for alignment those without icons.
    but this sounds not so attractive, are there any other ways? thanks a lot.

    Create a method to do the icons. One can have one parameter (menu text) and the other could have two parameters (icon name, menu text). Have the one with just one parameter set up a default transparent icon.
    Garry.

  • JMenu on multi-screen

    Hi
    I am in a multi-screen environment and i try to put a JMenuBar on each frame in each screen with the good alignment. My problem is that all the JMenu et JMenuItem are well left aligned on the left screen, but they are rigth aligned on the rigth screen.
    Could somebody please advise me on how to accomplish that.
    Thank you very much.
    Here is a sample of my investigation
    import java.awt.*;
    import javax.swing.*;
    public class Sample {
    public Sample() {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gs = ge.getScreenDevices();
    for (int j = 0;j < gs.length;j++) {
    JFrame f = new JFrame(gs[j].getDefaultConfiguration());
    Rectangle rect = gs[j].getDefaultConfiguration().getBounds();
    f.setLocation(10 + rect.x,10 + rect.y);
    JMenuBar menuBar = new JMenuBar();
    JMenu toto = new JMenu("toto");
    toto.add(new JMenuItem("fils � toto et titi"));
    menuBar.add(toto);
    f.setJMenuBar(menuBar);
    f.pack();
    f.show();
    public static void main(String[] args) {
    Sample sample = new Sample();

    Hi
    I am in a multi-screen environment and i try to put a JMenuBar on each frame in each screen with the good alignment. My problem is that all the JMenu et JMenuItem are well left aligned on the left screen, but they are rigth aligned on the rigth screen.
    Could somebody please advise me on how to accomplish that.
    Thank you very much.
    Here is a sample of my investigation
    import java.awt.*;
    import javax.swing.*;
    public class Sample {
    public Sample() {
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice[] gs = ge.getScreenDevices();
    for (int j = 0;j < gs.length;j++) {
    JFrame f = new JFrame(gs[j].getDefaultConfiguration());
    Rectangle rect = gs[j].getDefaultConfiguration().getBounds();
    f.setLocation(10 + rect.x,10 + rect.y);
    JMenuBar menuBar = new JMenuBar();
    JMenu toto = new JMenu("toto");
    toto.add(new JMenuItem("fils � toto et titi"));
    menuBar.add(toto);
    f.setJMenuBar(menuBar);
    f.pack();
    f.show();
    public static void main(String[] args) {
    Sample sample = new Sample();

  • Applet Menu Focus?

    Hi,
    I add some JMenus(with some JMenuItems) to a JMenuBar, and add the JMenuBar to a JApplet.
    One of the JMenuItems has an accelerator key("control H").
    When the applet is shown, the accelerator key doesn't work.
    If I press "any" JMenu/JMenuItems by mouse, then the accelerator key works.
    With the tests, I guess menus need the focus before they do something.
    Then how do menus get the focus when the JApplet is launched?
    When the JApplet is created, it calls method "setFocusable(true)", so the JApplet gets the focus,
    but how about the menus?
    Thanks!
    a cup of Java, cheers!
    Sha Jiang

    I may get something.
    The trouble occurs when I run the Applet by Eclipse,
    but when I run it with a real browser(e.g. FireFox 2, IE 6), the accelerator keys works well.

  • How to set JMenu/JMenuItem.accelerator property in Inspector

    How do you set an accelerator key through the accelerator
    property in the inspector for a JMenu or JMenuItem object? The
    list box contains one item, "<none>". Does one have to create
    some special keyboard shotcut objects that then will be added to
    the list?
    Where can one find documentation for the Swing classes, as far
    as I can see it's not included?
    Thanks.
    Finn Ellebaek Nielsen
    ChangeGroup ApS
    null

    I know how to do it in the code but it must be possible to do it
    from the Inspector since the property is listed there?
    Thanks.
    Finn
    JDeveloper Team (guest) wrote:
    : Finn,
    : I would check the Swing documentation available from the
    Javasoft
    : website for more information on these controls.
    : -L
    : Finn Ellebaek Nielsen (guest) wrote:
    : : How do you set an accelerator key through the accelerator
    : : property in the inspector for a JMenu or JMenuItem object?
    The
    : : list box contains one item, "<none>". Does one have to
    create
    : : some special keyboard shotcut objects that then will be
    added
    : to
    : : the list?
    : : Where can one find documentation for the Swing classes, as
    far
    : : as I can see it's not included?
    : : Thanks.
    : : Finn Ellebaek Nielsen
    : : ChangeGroup ApS
    null

  • JMenuItem whit Accelerator but without text

    helo
    I want to make JMenuItem whit accelerator but i don`t want text of accelerator on button! Help i dont know how to do that.
    I have my own MyJMenuItem I try to redefine paintComponent() method but this did not help.
    thanks

    You mean on an icon only menu item, or an invisible menu item? You could do control-key combinations with keybindings...
    http://java.sun.com/products/jfc/tsc/special_report/kestrel/keybindings.html

  • JMenuItem icon, text alignment question

    hello,
    can some one help with my question:
    I got 5 JMenuItems in a JMenu, some JMenuItems have icon, some not, I want to align them with icon and text in a neat format, like those in Sun's Forte IDE's Menu:
    but I can only do it like this:
    icon1 open..
    save As..
    icon2 new..
    Exit..
    (above each line represent a JMenuItem, I need to make "save as" ,"Exit" to in line with "open" and "new" in verticle direction,NOT with the icon)
    sb suggest always set an icon for each JMenuItem, set an transparent Icon for alignment those without icons.
    but this sounds not so attractive, are there any other ways? thanks a lot.

    you can always take a mort drastic action by subclassing MenuItem and
    overriding the painting method.
    But I belive that the first suggestion is faster.

  • JTable overrides the accelerator on JMenuItem

    I have a JFrame which has a JMenu. Some of the menu items have accelerators associated with them. And the JFrame has a JTable. The accelerators are working only when the focus is not in the JTable. But they are not working when the focus is in JTable. For example, when I selected a row in the table and press the accelerator key, it is not working. Can somebody provide me the solution for it?

    Here is the code:
    public class SwingEventPropagationTest {
         private static final int shortcutKeyAsciiValue = 65; //A
         public static void main(String[] args) {
              final JFrame frame = new JFrame();
              JMenuBar menuBar = new JMenuBar();
              JMenu menu = new JMenu("Edit");
              JMenuItem menuItem = new JMenuItem("Test");
              KeyStroke ctrlAKeyStroke = KeyStroke.getKeyStroke(shortcutKeyAsciiValue, InputEvent.CTRL_MASK);
              menuItem.setAccelerator(ctrlAKeyStroke);
              menuItem.addActionListener(new SelectAllAction());
              menu.add(menuItem);
              menuBar.add(menu);
              frame.setJMenuBar(menuBar);
              final JTable table = new JTable(new NumericTableModel());
              //Remove Keybindings from table
              table.getInputMap().put(ctrlAKeyStroke, "doNothing");
              table.getActionMap().put("doNothing", new DoNothingAction());
              JScrollPane scrollpane = new JScrollPane(table);
              JPanel panel = new JPanel();
              panel.add(new JButton("test"));
              panel.add(scrollpane);
              frame.getContentPane().add(panel);
              frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              frame.setSize(500,500);
              frame.setVisible(true);
         private static class NumericTableModel extends AbstractTableModel{
              public int getColumnCount() { return 2; }
              public int getRowCount() { return 10;}
              public Object getValueAt(int row, int col) {
                   int value = (row*2) + (col+1);
                   return value;
         private static class SelectAllAction extends AbstractAction{
              public void actionPerformed(ActionEvent e) {
                   //This should be shown when Shortcut Key is pressed
                   JOptionPane.showMessageDialog(null, "Worked");
         private static class DoNothingAction extends AbstractAction{
              public void actionPerformed(ActionEvent e) {
                   //do nothing
    }

  • JMenuItem accelerator on JTable

    Hi,
    I have a popup menu on a JTable. I have this code (executed at JTable show time):
    m_oPopupMenu = new JPopupMenu();
    JMenuItem oMenuItem = new JMenuItem("upd row");
    oMenuItem.addActionListener(new RowMouseAdapter.UpdateRowEvent());
    oMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M,
    ActionEvent.CTRL_MASK));
    oMenuItem.setMnemonic(KeyEvent.VK_M);
    m_oPopupMenu.add(oMenuItem);
    I also have a MouseAdapter which correcly show the pop-up menu and items. But accelerator-key doesn't works.
    Any idea?
    TIA
    Roberto Colmegna

    here is the code (it works correctly right mouse click, but it doesn't works
    with CTRL+O when cursor is over jTable1).
    import javax.swing.table.*;
    import javax.swing.event.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.*;
    public class JFrame extends javax.swing.JFrame {
      boolean m_bMove = false;
      /** Creates new form JFrame */
      public JFrame () {
        initComponents ();
      /** This method is called from within the constructor to
       * initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is
       * always regenerated by the Form Editor.
      private void initComponents() {
        jTable1 = new javax.swing.JTable();
        myInitJTable1();
        getContentPane().setLayout(null);
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        addWindowListener(new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            exitForm(evt);
        jTable1.setModel(new javax.swing.table.DefaultTableModel(
          new Object [][] {
            {null, null, null, null},
            {null, null, null, null},
            {null, null, null, null},
            {null, null, null, null}
          new String [] {
            "Title 1", "Title 2", "Title 3", "Title 4"
        getContentPane().add(jTable1);
        jTable1.setBounds(30, 90, 300, 64);
        pack();
      void myInitJTable1() {
          oPopupMenu = new JPopupMenu();
          JMenuItem oMenuItem = new JMenuItem("item");      
          oMenuItem.addActionListener(new ActionListener() {
            public void actionPerformed (ActionEvent actionEvent) {
              System.out.println("--------XXXXXXXXXXXXXXX-------");
          oMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,
            InputEvent.CTRL_MASK));
          oMenuItem.setMnemonic(KeyEvent.VK_O);
          oPopupMenu.add(oMenuItem);
          jTable1.addMouseListener(new MouseAdapter() {
            public void mousePressed(MouseEvent e) {
              if(e.getButton () != e.BUTTON3) // right mouse button
                return;
              oPopupMenu.show(e.getComponent(), e.getX(), e.getY());
      /** Exit the Application */
      private void exitForm (java.awt.event.WindowEvent evt) {
        System.exit (0);
       * @param args the command line arguments
      public static void main (String args[]) {
        new JFrame ().show ();
      // Variables declaration - do not modify
      private javax.swing.JTable jTable1;
      // End of variables declaration
      private JPopupMenu oPopupMenu;
    }TIA
    Roberto Colmegna

  • JTextPane key bindings override JMenuItem accelerators

    hi all,
    I have a JTextPane subclass, sitting on a JPanel, sitting on a JFrame which has a JMenu attached. One of my menu commands has an accelerator PgDn... I am trying to disable the PgDn default behaviour in the JTextPane so that the keystroke then "falls through" and activates the menu item...
    NOTHING WORKS! Using Keymap and InputMap, have tried "remove", have tried setting the action to "none", etc... it is simple enough to stop PgDn default behaviour in JTextPane, and if I looked into it I could probably explicitly put the action of the menu item in the action map of the JTextPane... but I want to cancel the key binding so that the system looks elsewhere and finds the JMenuItem accelerator...! is this too much to ask??
    I am a big user of hotkeys in apps and I want to understand more about all this stuff... how come there are no fewer than 4 generations of InputMap associated with a single JTextPane, for example?
    Thanks
    Mike

    Hi,
    Thanks for this... very useful clue... In fact JTextPane itself does handle the PgDn key binding, causing the insertion point to move to the end of the multiline text.
    But I followed your suggestion, finding that it is, perhaps unsurprisingly, the vertical Jscrollbar which (otherwise) handles PgDn, causing a scroll down... and a little experimenting finds that this scrollbar is created not on the fly, but once for each JScrollPane...
    So I also remove the vertical JScrollBar's key binding for "PgDn" (listing the bindings before and after removal) and... it STILL refuses to work!
    So I thought: aha, maybe by some anomaly you have a PgDn binding in the horizontal scrollbar... turns out it seems to share the same input map (actually the parent of the JScrollBar's getInputMap()) as the vertical scrollbar... so no, this doesn't work either!
    I also checked out scrollpane's viewport... 0 keys in getInputMap() and the latter does not have parent...
    Your suggestion looks like a very promising avenue... somewhere there is something trapping this key, but what? NB when a JButton, for example, is placed on the JPanel, and focus is on the button, PgDn activates the JMenuItem accelerator as expected, so it's obviously sthg to do with the complexity of having a JScrollPane combination
    Anything else you can suggest? I really don't want to have to explicitly put an action in the JTextPane... I like to understand, and I like elegant solutions...
    Thanks,
    Mike

  • Can't get panes to re-size with hotkeys

    I have a small annoyance whereby sometimes my hotkeys to re-size existing panes doesn't work.  I had changed the hotkeys to move from pane to pane to be Alt-Left (arrow) and Alt-Right (arrow) key.  After looking at the default settings by running tmux's in-pane help (the hotkey shift-?) I commented those two keys out thinking that would reset tmux to its default behaviour.  It hasn't worked so far and I'm not sure where else to look aside from my .tmux.conf file.  It's based on Thayer's own config:
    #~/.tmux.conf - tmux terminal multiplexer config
    # Based heavily on Thayer Williams' (http://cinderwick.ca)
    ## Environmental Options
    # Enable tmux to use a 256 colour terminal
    # Provided the underlying terminal supports 256 colours, it is usually sufficient to add the following to ~/.tmux.conf:
    set -g default-terminal "screen-256color"
    set -g terminal-overrides 'xterm*:smcup@:rmcup@'
    # If you SSH into a host in a tmux window, you'll notice the window title of your terminal emulator remains to be user@localhost
    # rather than user@server. To allow the title bar to adapt to whatever host you connect to, set the following in ~/.tmux.conf
    set -g set-titles on
    set -g set-titles-string "#T"
    # open a man page in new window
    bind m command-prompt "split-window 'exec man %%'"
    ## By default, all windows in a session are constrained to the size of the
    ## smallest client connected to that session, even if both clients are
    ## looking at different windows. It seems that in this particular case, Screen
    ## has the better default where a window is only constrained in size if a
    ## smaller client is actively looking at it. This behaviour can be fixed by
    ## setting tmux's aggressive-resize option.
    setw -g aggressive-resize on
    # mouse-select-pane [on | off]
    # # If on, tmux captures the mouse and when a window is
    # # split into multiple panes the mouse may be used to
    # # select the current pane. The mouse click is also
    # # passed through to the application as normal.
    set -g mouse-select-pane on
    ## Upon starting to use tmux, I noticed that I had to add a noticeable delay
    ## between two characters in a command sequence for it to recognize the
    ## command, for example between the C-a and n in C-a n. This is because tmux is
    ## waiting for an escape sequence. Fix that by setting escape time to zero.
    set -s escape-time 0
    ### Hotkeys and Commands
    ## Binds
    # set prefix key to ctrl+a
    unbind C-b
    set -g prefix C-a
    ## Quick way to mosh/ssh into another system bound to S [Shift-S]
    bind S command-prompt -p 'SSH to:' "new-window -n %1 'mosh %1'"
    # reload config without killing server
    bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
    # toggle last window like screen
    bind-key C-a last-window
    # more intuitive keybindings for splitting
    unbind %
    bind v split-window -v
    bind - split-window -v
    unbind '"'
    bind h split-window -h
    bind \ split-window -h
    # send the prefix to client inside window (ala nested sessions)
    bind-key a send-prefix
    # confirm before killing a window or the server
    bind-key k confirm kill-window
    bind-key K confirm kill-server
    # toggle statusbar
    bind-key b set-option status
    # ctrl+left/right cycles thru windows
    #bind-key -n C-right next
    #bind-key -n C-left prev
    #bind-key -n M-right next
    #bind-key -n M-left prev
    # open a man page in new window
    bind m command-prompt "split-window 'exec man %%'"
    # quick view of processes
    bind '~' split-window "exec htop"
    # scrollback buffer n lines
    set -g history-limit 5000
    # listen for activity on all windows
    set -g bell-action any
    set -g bell-on-alert on
    set -g visual-bell off
    # on-screen time for display-panes in ms
    set -g display-panes-time 4000
    # start window indexing at one instead of zero
    set -g base-index 1
    # disable wm window titles
    set -g set-titles off
    # disable auto renaming
    #setw -g automatic-rename on
    # border colours
    set -g pane-active-border-bg default
    #set -g pane-border-fg blue
    # wm window title string (uses statusbar variables)
    set -g set-titles-string "tmux:#I [ #W ]"
    #set -g set-titles-string "tmux"
    # session initialization
    #new -s0 -nTTYtter 'ttytter'
    #neww -t0:1 -nvifm 'vifm'
    #selectw -t 1
    ### default statusbar colors
    set -g status-fg white
    set -g status-bg default
    set -g status-attr bright
    ### White Yunzi - statusbar
    set -g status-interval 1
    set -g status-justify centre # center align window list
    set -g status-left-length 30
    set -g status-left '#[fg=white,bright] [ #[fg=green,bright]#H#[fg=white,bright] ]#[fg=white] Up #(uptime | cut -f 4-5 -d " "|cut -f 1 -d ",")'
    set -g status-right-length 30
    set -g status-right '#[fg=green,bright][#[fg=white,bright] %a %m-%d-%Y %H:%M #[fg=green,bright]]'
    ### Silver Yunzi - statusbar
    # set -g status-interval 1
    # set -g status-justify centre # center align window list
    # set -g status-left-length 30
    # set -g status-left '#[fg=white,bright][ #[fg=blue,bright]#H#[fg=white,bright] ]#[fg=white] Up #(uptime | cut -f 4-5 -d " "|cut -f 1 -d ",")'
    # set-option -g status-right '#[fg=yellow]%k:%M #[fg=blue]%a,%d-%b#[default] '
    # set -g status-right-length 30
    # set -g status-right '#[fg=blue,bright][#[fg=white,bright] %a %b-%d-%Y %H:%M #[fg=blue,bright]]'
    # set-option -g status-right '#[fg=yellow]%a:%M #[fg=blue]%a,%d-%b#[default] '
    ### Pink Yunzi - statusbar
    # set -g status-interval 1
    # set -g status-justify centre # center align window list
    # set -g status-left-length 30
    # set -g status-left '#[fg=white,bright] [ #[fg=magenta,bright]#H#[fg=white,bright] ]#[fg=white] Up #(uptime | cut -f 4-5 -d " "|cut -f 1 -d ",")'
    # set -g status-right-length 30
    # set -g status-right '#[fg=magenta,bright][#[fg=white,dim] %a %m-%d-%Y %H:%M #[fg=magenta,bright]]'
    ### White Yunzi - active window title colors
    set-window-option -g window-status-current-fg green
    set-window-option -g window-status-current-attr bright
    set-window-option -g window-status-current-bg black
    set-window-option -g window-status-current-attr bright
    ### Silver Yunzi - active window title colors
    # set-window-option -g window-status-current-fg blue
    # set-window-option -g window-status-current-attr bright
    # set-window-option -g window-status-current-bg default
    # set-window-option -g window-status-current-attr bright
    ### Pink Yunzi - active window title colors
    # set-window-option -g window-status-current-fg magenta
    # set-window-option -g window-status-current-attr bright
    # set-window-option -g window-status-current-bg black
    # set-window-option -g window-status-current-attr bright
    ### default window title colors
    # set-window-option -g window-status-fg white
    # set-window-option -g window-status-bg default
    # set-window-option -g window-status-attr bright
    ### Silver Yunzi - command/message line colors
    set -g message-fg white
    set -g message-bg black
    set -g message-attr bright
    # show some useful stats but only when tmux is started
    # outside of Xorg, otherwise dwm statusbar shows these already
    #set -g status-right ""
    #set -g status-left ""
    #if '[ -z "$DISPLAY" ]' 'set -g status-left "[#[fg=green] #H #[default]]"'
    #if '[ -z "$DISPLAY" ]' 'set -g status-right "[ #[fg=magenta]#(cat /proc/loadavg | cut -d \" \" -f 1,2,3)#[default] ][ #[fg=cyan,bright]%a %Y-%m-%d %H:%M #[default]]"'
    #if '[ -z "$DISPLAY" ]' 'set -g status-right-length 50'
    Insights appreciated! 

    No--
    In the Motion tab... right click the video in the sequence and send to viewer...
    Then under the MOTION tab... twirl down the DISTORT triangle and then check the aspect ratio there... set either to 0, 33 or -33.
    Good luck,
    CaptM

  • Firefox hotkeys do not function correctly or at all when first loading a page. What is going on?

    When i open a video in youtube the hotkeys do not function until i switch to another tab and then back again. Also i can't use the kotkeys to change the volume at all while i am tabbed into firefox.

    Try to disable hardware acceleration.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers

  • JMenuItem question?

    You can set an accelerator for a JMenuItem like this:
    menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, ActionEvent.CTRL_MASK));Which sets the accelerator to Ctrl + C.
    My question is, how do you make Ctrl + Shift + C or F5 to become accelerators?

    have you tried combining them with "or"?
    menuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C,
          ActionEvent.CTRL_MASK | ActionEvent.SHIFT_MASK));Edited by: Encephalopathic on Jun 2, 2008 2:25 PM

  • JTabbedPane w/ Accelerator Keys

    I need to add accelerator keys to the tabs of a JTabbedPane, much like the accelerators in a JMenuItem (i.e. under-score for Alt-F, or CTRL-X, etc...).
    Any suggestions?
    Thanks!

    It doesn't support accelerator, but it does support mnemonics. Check out the API for more information.

Maybe you are looking for

  • Photo Gallery in Dreamweaver

    I am updating a site that has a flash gallery displayed within a table cell.  I want to replace the flash (.swf) gallery with an html one that would be apple friendly.  Is there a way to embed an html/java slideshow within a table on a page? Lightroo

  • Photoshop CC 2014 free trial will not install on Win8

    I am trying to install but get this - mind you, I'm not familiar with 99% of the terms used in this error message, so please, I kindly ask, explain what I need to do in simplistic terms.  I don't know what the error message means.  Thank you for your

  • Can I downgrade the software on my iPod touch from 4.2.1 to 4.1

    I recently upgraded the software on my 4th generation iPod touch from 4.1 to 4.2.1. Since then I can not use it in my car, the iPod is marked as unreadable. I wish to go back to my previous version of 4.1. Is this possible? I have sync'ed my iPod mul

  • Time Machine can no longer find backup disk

    I have a USB drive hooked up to my airport extreme that I used to use as a TimeMachine backup for my MacBook Pro. I use another external drive to back up my iMac, but it is connected to the iMac directly. The drive on the airport extreme used to back

  • Read a text file and display a xy graph

    Hi! I am using LabVIEW 8.5, and I am trying to read columns from a file and plot with xy graph. I can do it with two channels, but I am having problems when the numbers of channels connected increase (maybe six or ten). My text file looks like this: