TAB key isn't available in swing applications on Linux

Hello,
I have a small Swing application, everything works fine except that TAB key isn't available within java
application. I tried several JVM (IBM and Sun JVM from 1.2.2 to 1.4.0_b92) and two Red Hat release (6.2 and 7.2), I had no success with TAB key. The same application works perfectly on Windows for example. Can this problem have something to do with a bad Xmodmap file? I tried with a standard Xmodmap file (/usr/X11R6/lib/X11/etc/xmodmap.std), but TAB key was still unavailable. On non-java application, TAB key is available normally.
Any suggestion would be appreciated.
Thanks in advance.

Do you mean that
(1) when you are running a swing application and you press the tab key expecting focus traversal, nothing happens?
OR
(2) when you are listening for KeyEvent within your application, tab key doesn't give you KeyEvent.VK_TAB?
OR
(3) something else?
I have no Linux but would try to offer suggestions if I understood better.

Similar Messages

  • Tab key in the ActiveX AcroPDF crashes application

    Hello everybody,
    I wonder whether any of you had this problem working with an ActiveX which displays a PDF file.  This is the situation:
     -  I've designed a VI which displays a pdf file in the ActiveX container (see attached) using LabVIEW 2009 Proffessional SP1.  I'm running in Windows XP, and I've got installed Adobe Reader 8.
     - When running this VI using LabVIEW, everything works fine.
     - I've build an executable, which works perfect in the computer where LabVIEW is installed.
    Now, I try to execute the same executable in a clean computer which has installed Adobe Reader 9 and LabVIEW Run-Time 9.  It seems to work fine, and the pdf is perfectly displayed, with all the Adobe options working well.  But the problem shows when pressing the "Tab" key.  The executable crashes with the typical windows screen which says that an error has been detected and that the program will be closed.  And that is what happens.  The application is closed suddenly,
    I remember to have seen few months ago a post with the same issue.  A bug in LabVIEW 8.5 would be the reason and I thought that the problem would dissapeared when getting the LabVIEW 2009.  But as far as I can see, it didn't, and I cannot find this post again.
    Thanks in advance for any help you might give me, and if you need further details of the VI or versions used, just let me know.  I hope somebody came accross with this issue before and can give me a hand.
    Regards,
    Dani
    Attachments:
    Loading pdf.JPG ‏24 KB

    Well, that seems like a definite LabVIEW bug to me.  I just reproduced it (NOT as an executable) with a simple self-contained program.  I've attached a code snippet below.  While it is running I pressed the Tab several times.  Eventually it locks up and closes LV without any notice at all.  It's a very repeatable crash, for what that's worth.
    Greg
    Certifed LabVIEW Developer

  • Problem with Tab key

    Hi all,
    I have a swing appication run JDK1.3.1. I try to run on JDK1.4.2 is OK, but TAB key isn't available from this component to other component.
    Any suggestion would be appreciated.
    Thanks in advance.

    Component can JButton, JTextField, JComboBox...
    Not at all Dialogs error with tab key, but when open Dialog that is'nt available with tab key then next dialogs is'nt available too althought they available with tab key.

  • [Bug?] How to use the Tab key in forms

    Ahoy!
    The latest release of Photoshop has "broken" the native behavior of the Tab key in html panels. I'm not sure if this is a bug or just a new API I need to incorporate.
    Expected behavior:
    1. Focus into text field in a form
    2. Hit the Tab key
    3. The next field is focused.
    Actual behavior
    1. Focus into text field in a form
    2. Hit the Tab key
    3. Photoshop hides the application UI (Photoshop hotkey tab behavior).
    Anyone happen to know if there's something that can be done about this?

    Bug is very annoying for our users when they try to input their usernames and passwords to login (often) and also when they're filling out a large form with four fields in it.
    Hope it is fixed soon or a work around provided.
    Tom Wrenn
    Frontend Engineer
    CreativeWorx

  • HT204382 Quick time Player can't open because a required codec isn't available.  The DVD I am trying to play was made on an IPAD.  My Imac came with a IMac Application install DVD, A IMac Mac OS X Install DVD, & iWork, I don't think I have iLife

    Quick time Player can't open because a required codec isn't available.  The DVD I am trying to play was made on an IPAD.  My Imac came with a IMac Application install DVD, A IMac Mac OS X Install DVD, & iWork, I don't think I have iLife What additional software do I need?

    Perian 1.2.3 *should* work for both QuickTime & and QTX in Mountain Lion. Regardless of the filetype container, whether it is a Matroska (.mkv) or a .mov. As to the actual encoding of the file (h264, .mp2, whatever..) I have found most play, even older formats.
    Even though it's no longer supported and is a dead project, it works just fine. It will load as a System Preference file and adds to the Other category in them.
    I think in 10.8 you've still got support for QTX so it may work with that. (in Mavericks, it only works for QT7)
    If not, just run QuickTime 7.6.6.
    http://perian.org
    If no luck there, you could also try VLC at http://www.videolan.org

  • How to restart swing application by using shotcut key (ex :CTRL+ALT+ENTER)

    Hi,
    Currently my swing application freezs some times, it will not come back, only option i have is restart.
    Can some one can help me how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application. (in any state, my action should allow to restart).
    Thanks
    Anjan
    Edited by: 807057 on Nov 2, 2010 9:16 AM

    Currently my swing application freezs some times, it will not come back,I would work on fixing that problem. Sounds like you aren't using Threads properly and are blocking the EDT. Read the section from the Swing tutorial on [url http://download.oracle.com/javase/tutorial/uiswing/concurrency/index.html]Concurrency for more information.
    how i can implement short cut key (CTRL+ALT+ENTER) that can restart my application.Within Swing this would be done by using "Key Bindings". A section on Key Binding is found on the tutorial link from above. However, is Swing actually is frozen then this won't work.
    Therefore this would need to be done at the OS level, which java doesn't support. You would need to use JNI, which I know nothing about.

  • Moowing focus with the tab key (swing)

    Hi. I have a JFrame with 4 text areas in. I want to be able to "hop" to the next text area by pressing the tab key. Most internet pages says this is default, but when I press tab, I get a tab space inside the text area I'm in.. Any ideas on how to do this? (i use Java 1.5)

    HashSet focusForward = new HashSet();
    HashSet focusBackward = new HashSet();
    focusForward.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB,0));
    focusBackward.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_TAB,InputEvent.SHIFT_DOWN_MASK));
        myTextArea.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS,focusForward);
    myTextArea.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS,focusBackward);

  • How to give Common Background color for all JPanels in My Swing application

    Hi All,
    I am developing a swing application using The Swing Application Framework(SAF)(JSR 296). I this application i have multiple JPanel's embedded in a JTabbedPane. In this way i have three JTabbedPane embedded in a JFrame.
    Now is there any way to set a common background color for the all the JPanel's available in the application??
    I have tried using UIManager.put("Panel.background",new Color.PINK);. But it did not work.
    Also let me know if SAF has some inbuilt method or way to do this.
    Your inputs are valuable.
    Thanks in Advance,
    Nishanth.C

    It is not the fault of NetBeans' GUI builder, JPanels are opaque by default, I mean whether you use Netbeans or not.Thank you!
    I stand corrected (which is short for +"I jumped red-eyed on my feet and rushed to create an SSCCE to demonstrate that JPanels are... mmm... oh well, they are opaque by default... ;-[]"+)
    NetBeans's definitely innocent then, and indeed using it would be an advantage (ctrl-click all JPanels in a form and edit the common opaque property to false) over manually coding
    To handle this it would be better idea to make a subclass of JPanel and override isOpaque() to return false. Then use this 'Trasparent Panel' for all the panels where ever transparency is required.I beg to differ. From a design standpoint, I'd find it terrible (in the pejorative sense of the word) to design a subclass to inconsistently override a getter whereas the standard API already exposes the property (both get and set) for what it's meant: specify whether the panel is opaque.
    Leveraging this subclass would mean changing all lines where a would-be-transparent JPanel is currently instantiated, and instantiate the subclass instead.
    If you're editing all such lines anyway, you might as well change the explicit new JPanel() for a call to a factory method createTransparentJPanel(); this latter could, at the programmer's discretion, implement transparency whichever way makes the programmer's life easier (subclass if he pleases, although that makes me shudder, or simply call thePanel.setOpaque(false) before returning the panel). That way the "transparency" code is centralized in a single easy to maintain location.
    I had to read the code for that latter's UI classes to find out the keys to use (+Panel.background+, Label.foreground, etc.), as I happened to not find this info in an authoritative document - I see that you seem to know thoses keys, may I ask you where you got them from?
    One of best utilities I got from this forum, written by camickr makes getting these keys and their values very easy. You can get it from his blog [(->link)|http://tips4java.wordpress.com/2008/10/09/uimanager-defaults/]
    Definitely. I bit a pair of knucles off when discovered it monthes after cumbersomely traversing the BasicL&F code...
    Still, it is a matter-of-fact approach (and this time I don't mean that to sound pejorative), that works if you can test the result for a given JDK version and L&F, but doesn't guarantee that these keys are there to stand - an observation, but not a specification.
    Thanks TBM for highlighting this blog entry, that's the best keys list device I have found so far, but the questions still holds as to what specifies the keys.
    Edited by: jduprez on Feb 15, 2010 10:07 AM

  • Tab key no longer moves between text fields on a web page

    Since upgrading to Mac OS X 10.4.9, my Safari v. 2.0.4 (419.3) is suffering from a bizarre symptom: the tab key no longer moves the insertion point among the various single-line text-entry fields on a page, but rather inserts a tab character within the field! Shift-tab, which used to move the insertion point back one field, does nothing.
    Interestingly, when in a block-text field -- such as the one I'm using to compose this message topic -- the tab key takes me to the next field as expected. It also works when the insertion point is in the URL field or Google search field in the browser interface itself. It's only when I'm typing into a web page itself that it doesn't behave properly.
    Makes filling out long forms a real pain.
    Surely this isn't happening to everyone, or someone else would have mentioned it ... but can anyone reproduce it? Got any suggestions for clearing it up? I'm not running any exotic Safari add-ons, just the usual complement of plug-ins, none of which seem relevant to this problem, which involves normal HTML web pages.
    Thanks in advance for any help.
    G4 QuickSilver 1.467GHz   Mac OS X (10.4.9)  

    There were no file changes to Safari in the 10.4.9 update. There were a number of file changes to the System Library, however, these types of changes usually affect applications across-the-board. MacFixit has a special report and related issues and work-arounds on their site. Not sure if you need to be a subscribed member to see the information, however, it might be worth a look.
    FWIW, I haven't seen any mention about the problem you reported on their forum, or home page report.
    I suggested your marking the thread "answered" as I thought you were complete with the thread given the disappearance of the problem. I'll be curious to see who else posts a similar problem.

  • Tab key dosent work on some machines

    Hi,
    We have a swing application in which we use tab key to navigate input fields. The problem is that on some machines the tab key does not do anything where on some it works perfectly.
    Could it be a JRE version or any other issue? (OS is Windows 2000 on all machines)
    Any input will be much appreciated.
    Thanks,

    What version are you using? 1.4 or 1.3.1

  • Problem: do something, if jumping in another textfield through tab-key

    hi,
    please, maybe can anybody help me.....
    I've got some textfields (JTextField) in a swing-application. by jumping in another textfield through pressing the tab-key, something should happen.
    I wrote the following code, but it doesn't works ;-(
    textfieldReleaseOf.addKeyListener(new KeyAdapter() {
    public void keyPressed(KeyEvent e) {
    if (e.getKeyCode() == KeyEvent.VK_TAB ) {
    System.out.println("tabspr...................");
    else {
    System.out.println("kein tabspr...................");
    thanks for helping......

    From your problem description it seems that you need to do something not only when the user presses TAB but also if the user switches to some other textfield. Although it could be accomplished using the KeyListener as you have already done, a better way would be to use the FocusListener. You can add a FocusListener to your JComponent (or JTextField) object. It will fire events whenever the user presses tab to move onto the next field and even when the user clicks on the next field using a mouse.

  • Having problme in JTable, when I press TAB key from KeyBoard

    Hi All,
    I believe I could get the solution here,
    We have desinged small Swings application, which is contains a JTable to get some order values from the end users.
    After we enter the values in the first column, when we press tab it's not moving to next column. and also the pointer again goes back to first column.
    This problem we are facing in only 2 PC's out of 15.
    If something problem with the code, I should affect in all the PC, Since it's affected in only 2 PC's It's makes puzzle on the issue.
    I greatly appreciate if someone advice the solution.
    Thanks in advance.
    With Cheers,
    Prasanna T

    Sounds that Windows thinks that the Alt key is (still) pressed.
    Does it help if you press all status keys (Shift, Ctrl, Alt) a few times?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • The correct approach to intercept TAB key

    Dear Experts,
    I have developed a GUI out of javax.swing. The GUI consists of JFrame, several JPanels and javax components, such as JTextField, JLabel, JComboBox, JTable and many more.
    Now, I want to change the behavior when user presses TAB key. By default TAB key moves focus from a component to another component. How can I disable this?
    I come to two alternatives that I am not sure which one is the correct approach. Could you please advise me?
    Alternative 1.
    Use key binding on GlassPane.
    Alternative 2.
    Use event-handling on GlassPane.
    If those alternatives are not the best one, could you please provide another alternative?
    I have tried the following, but they didn't work...
    Action doNothing = new AbstractAction() {
        public void actionPerformed(ActionEvent e) {
            System.out.println("Tab-key is pressed.");
    cmbPCode.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "doNothing");
    cmbPCode.getActionMap().put("doNothing", doNothing);or
    getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "doNothing");
    getRootPane().getActionMap().put("doNothing", doNothing);where cmbPCode is a JComboBox that receives focus when the GUI shows up.
    Thanks for your help,
    Patrick
    Edited by: Patrick_Stiady on Mar 31, 2009 6:51 AM

    Thank you for the advice. I am developing an application where the user is not computer literated, so that I have to limit functional key as many as possible and only allow several keys to be active. For example, I don't want TAB key to change the focus, instead I want TAB key to do nothing.
    I have tried keybinding, because I think this is the most relevant, but somehow I failed to recognize which component should be bound with keybinding. I have tried to change the input map of the component that receives the focus when the GUI is displayed (cmbPCode) as can be seen on my first post. I also tried to change the input map of the root pane. Both are not successful.
    Now, I wonder whether
    1. it does not work because the key is not consume()?
    2. Or should I use key listener, which I would only use if keybinding were unable to serve my goal?
    3. Or should I learn how to intercept key on the glass pane?
    4. Is keybinding able to nullify default action, such as changing focus by TAB key? I am asking this, because I'm going to nullify other important key such as ENTER key.
    Thank you for any guidance,
    Patrick

  • License for swing application

    Hello guys,
    I need your help about a question.
    In the next days I'll develop a java application (swing application) for a customer.
    What I need is to forbid possibility to copy this application on other pc, so I need some license system.
    How can I bind installation of application (that is running of jar) on a specific pc and forbid to use it on other pc?
    I need to do it without key device, but via software.
    What's best solution for this issue?
    I would appreciate any help,
    Thanks

    snic.snac wrote:
    How exactly is that going to keep a user from using multiple copies on a single subscription?It isn't. And my message is that it isn't worth worrying about this ...
    The business "requirement" you have is usually not "how do I prevent my customer from making multiple copies" or "how do I prevent people from copying my application illegaly". Your requirement is (or should be) "how do I make more money with this".
    History has tought us that focusing on making the software hard-to-copy is a bad idea because the cost of making a reasonably well-working copy-protection is very high and even those are easily broken (it need only be broken once, then everyone can get a copy).
    Now if you make buying the software actually provide some additional value (automated, timely updates; online support; access to a feature-request queue; ...) and keep the price reasonable, then "copying + using only half a product" becomes more "expensive" to the user than "buying and getting the full advantage".
    I have to agree, 'though, that in the case of custom-built software for a single client that's not really relevant. I'd agree that you should simply request that they pay enough money so that you don't have to worry about copy protection. Maybe offer them the source if they do, so that they actually get some value out of it (see the theme? providing value for the money helps you get the money).

  • Book Recommendation for Building Swing Applications

    I'm looking for recommendations on books for building swing applications from the ground up.
    I'm not a strong GUI developer. 95% of my experience has been strictly on back end development in many other languages. What little GUI experience I have has been with C++ (years ago) and most recently with HTML.
    I know what I want to develop, and even have the GUI design for my application drawn out. I just need a good book that can walk me through developing the interface in Java.
    I already have several books on Java. But, I find them somewhat limiting because they don't help me build the app from the ground up.
    Yes, I've tried the online book on the Sun site, "The Jfc Swing Tutorial: Guide to Constructing Gui's".
    Please offer some recommendations and reasons on why you like the book.
    Thanks.

    A few comments to that ....
    the first thing is understanding the LayoutManagers, that are available.
    I will give you a short guideline where they are usefull:
    FlowLayout - usefull for JLabel-JTextField combinations or several JButtons
    BorderLayout - usefull for the structure of basic containers
    CardLayout - usefull for every area of the screen, where you want to appear different panels
    GridLayout - usefull for a group of same-sized components laid out in a grid
    GridBagLayout - usefull for a group of components, that have different sizes, very flexible
    JTabbedPane - a special container, that is similar to CardLayout but with visible tabs to switch panels
    Normally you can say "I want that group at the bottom of the frame, that other group at its left side, that toolbar at its top" - if you can say so - that shouts for BorderLayout. If you can say "in this area I want to use several panels" that means CardLayout or a JTabbedPane.
    You see, if you have an idea, what the LayoutManagers do, you know exactly which area needs what Layout - so you have a guideline, which LayoutManager to use in that panel.
    To make an example:
    You want 3 buttons centered at the bottom of a frame - this 3 buttoms should be of that size, that is needed by the button texts. So, what to do:
    1. create a JPanel with FlowLayout
    2. create the buttons and add it to that JPanel
    3. create another JPanel with BorderLayout
    4. add that first JPanel to the second JPanel at BorderLayout.CENTER
    5. add this Panel to the ContentPane of the frame at BorderLayout.SOUTH
    that is a simple panel in panel construct - placing 3 buttons centered at the bottom of the frame. You have to play with that different LayoutManagers a little bit - the way you stick one panel in another changes the look of the GUI - if you know, how it changes (by playing with the examples of the tutorial), you will have that "from the ground"-experience, you are looking for - believe me.
    greetings Marsian

Maybe you are looking for

  • Transfering tests from iPhone 4 to iPhone 5

    I had a old iPhone 4 and activated a new iPhone 5 from an iCloud backup. Was disappointed that the texts/iMessages did not come over to the new phone. Is there a way to do that once the new phone had been activated and at least partially populated fr

  • Reports in Favorite Reports did not run when open

    In SCOM 2012, I have run a few reports with the report template in the default SCOM management pack and saved them in the Favorite Report. When I open the saved reports at the Favorite Report again, they suppose to be run automatically. However, when

  • How to stop ERP Quotation for BP with role Prospect

    Hi, We have implemented cross system transactions from CRM opportunity to ERP Quotation. We create prospects with sales area data in CRM UI. Though in GUI unless the role sold- to party is selected the sales area data tab is not activated, however no

  • Oracle RAC server's IP and Subnetmask change

    Oracle DB Version:10.2.0.3.0 OS version : RedHat linux 4 Number of Nodes: 2 We need to move our RAC db servers from Atlanta to NJ. This move requires IP and subnet mask change. How we can do this chanse in for nodeapps / CRS components?

  • How to get Moving Average Price ( MAP ) & Standered Price in BW

    Hi all, I want to get the Moving Average Price ( MAP) & Standered price in BW Report.So that please suggest me 1. which Cube I have to use & 2.  which datasource having that Moving Average Price ( VERPR) Field. If having other Procedure to calculate