Focus handling in applet

I am designing an applet for entering your time worked. I have several text fields, and i want them to be able to have the current time inserted into them by pressing a JButton. Here is my actionPerformed() code:
public void actionPerformed(ActionEvent e)
        String acts[] = {"Submit", "Insert Current Time", "Clear"}; 
        String action1 = e.getActionCommand();
        KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        Component c = focusManager.getFocusOwner();  
        if (e.getSource().equals(timeIn1))
            timeIn1.setText("Good!");
        //timeIn1.setText(action1);
        String cN = c.getClass().toString();
        if (action1.equals(acts[1])) {
                timeOut1.setText("crap");
                timeOut2.setText(cN);
    }cN always returns information about the JButton pressed. How can I get the applet to recognize what the JTextField was that had focus before pressing the button?

I got the code to work....I set an empty component to receive the object that has focus and did an instanceof to make it work

Similar Messages

  • Call a Form using Webutil from the Menu loose focus on the applet

    Hello,
    I have the following problem:
    When calling a form using webutil from the menu the focus on the applet (I mean the Forms Application window) is lost and I have to click on the window to get back the focus on the application.
    Any advice ?
    Env: Forms 9i / Webutil 1.06
    Rgds,
    Philippe

    Try to use the NO_HIDE parameter in the CALL_FORM() built-in.
    Call_Form( 'the_form', NO_HIDE ) ;Or maybe, in the[b] When-New-Form-Instance trigger of the called form, return the focus to the calling form
    Go_Form( Get_Application_Property( CALLING_FORM ) ) ;Francois

  • Problems with ADF in JDeveloper 10.1.2 - Focus Handling in a Table

    Hi there,
    we have a problem with the focus handling in a JClient-Table
    (embedded in a JScrollPane).
    When I insert a new row in a table (e.g. with 2 columns),
    and insert in the second column some text and
    (while the focus is still in the second column) then
    add again a new row to the table, the text from the
    "lost-focus-column" is moved to the new row.
    Example:
    Add row 1 (columns Name, FirstName) => Result:
    Row 1: Smith John
    Add row 2 => Result:
    Row 2: <empty> John
    Row 1: Smith <empty>
    Is that a bug of the framework or does anyone know a workaround for that
    behaviour ?
    Tanks a lot...
    Cheers, Claus

    Hi,
    problem solved. It's a Swing problem. The following line of code is neccessary:
    dataTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    (dataTable is the jTable).
    Unfortunately other Swing-Components (e.g. JTextField) don't have that
    client property :-(.
    Cheers,
    Claus

  • Focus on JSP Applet

    Hi,
    I have an application where an applet loads when the appropriate part is clicked from a tree. The problem here is the focus does not directly get on the applet and instead i first have to click on it to activate it. Can any one please tell me how to focus on the applet directly.
    Thanks,
    Sharath

    r u use <applet> tag independently with out depending or inside any click or load functions...
    check it ...
    r post ur code

  • Handling multiple applets inside applet window

    Hi all,
    Does anyone know of a tutorial for handling multiple applets inside an applet window ?? Any suggestions would be greatly appreciated.
    Regards,

    Hello vhhuynh,
    Did you ever get a solution to your question: 'tutorial for handling multiple applets inside an applet window'?
    I have the same situation...
    thanks, msp@duke

  • Focus handling when TableCellEditor is removed

    Hi,
    I have a problem finding out what the exact focus behavior is when in JTable the editor is closed. There seems to be a difference when using editor components that are panel based and editor components that are not panel based. When I use a Component (returned by TableCellEditor.getTableCellEditorComponent) like a JTextField the focus goes back to the JTable so that it indicates the focused cell (the one that was edited). When I use a component based on JPanel the focus traverses when closing the editor to the next component in the focus cycle (after the JTable).
    Did anyone every see this behavior before, what is the cause of this and obviously how can it be specified that the behavior for the JPanel should be the same as for the JTextField.
    The environment that I am working on is IBM JDK 1.4.2 for Windows.
    If anybody has a good reference for documentation on focus handling and especially how to debug it, this is also very welcome!
    Many thanks,
    Marcel

    Does anyone have a good understanding of this method in Component:
        public void removeNotify() {This seems like the method that orchestrates the focus change when a component is removed from another component. I don't see why JPanel instances are handled differently from JComponent instances.
    By the way this solves my problem a bit: adding these lines of code in an overridden implementation of removeEditor in subclass of JTable (just before setting editorComp to null):
        if (editorComp instanceof JPanel){
           requestFocusInWindow();
        }But the problem is that in this case first the focus goes to the next component and then it goes back to the table. (which could have side effects if the next component changes state because of receiving the focus).
    Any comments would be welcome.
    Thanks,
    Marcel

  • Webutil_host.nonblocking get focus back to applet

    When you launch a program using webutil_host.nonblocking(), is there a way to get the focus back to the Forms applet automatically without closing that program?
    In older Client/Server versions I believe this was possible using the constant SW_SHOWNOACTIVATE but in webutil I can not find an alternative.
    Thanks,
    Jeroen

    Controlling and external app's window focus and z-order from a java applet is not likely going to be a simple task. As I mentioned, the easiest approach would likely be to start the external app minimized or attempt to control the state of the Forms window. In other words, after calling the external app force the Forms window to the foreground. This is likely going to be the simplest place to start. You still may need to manage cursor focus, but this approach might at least get the Forms application back to the foreground where you can then figure out how to handle the cursor.
    So in other words,
    1. Add a java bean to your form which will control the state of the Forms applet window/frame. See the following:
    http://forms.pjc.bean.over-blog.com/article-2203967.html
    Understand that this will only work if Forms separateFrame=true.
    2. From the form, call your external app. Immediately after making the call to WebUtil to start the external app, execute a SYNCHRONIZE then call the above bean to bring the Forms separateFrame to the foreground using an "always on top" feature.
    3. Once the form is on the top of the z-order (in the foreground), disable the "always on top" option.
    In theory, the above should accomplish most of what you want. However, just because you brought the form to the foreground does not necessarily mean that the cursor focus will be in any particular item of the form. In fact, it is most likely that focus will be on the title bar of the form. The user would have to click on the desired field or button to perform their next task. Controlling the cursor focus at this point may be possible by executing a GO_xxxx to an item or block. If not, another bean or modifications to this one may be necessary in order to place the cursor back on the displayed canvas.
    if any of this stuff is something you are not familiar with, I suggest a google or similar search as what you are attempting to do is leaning into what many would call advanced tweaking ;)

  • WHEN-WINDOW-ACTIVATED gives focus back to applet window

    Testcase:
    Form A calls form B
    Form B performs this code:
    BEGIN
    web.show_document(url);
    exit_form;
    END;
    This should open a new browser window to the URL and keep the focus on it.
    However, when form A has a WHEN-WINDOW-ACTIVATED trigger (even when the only code is NULL;), it return the focus to the forms applet browser window the first time.
    This is very annoying because the new browser window can no longer be seen as it is put on the background. Strangly enough, the following times the focus remains on the new browser window.
    Is this a known bug?
    PS: The problem is that i really need a WHEN-WINDOW-ACTIVATED trigger in my form A to perform some webutil-functions.
    Environment:
    Forms Developer 10g Release 2
    Application Server 10g Release 2
    Window 2000/Xp
    Oracle Jinitiator 1.3.1.22

    In which trigger are you calling Form B? As I said, the EXIT_FORM event would take you back to Form A after opening the browser window, so what happens next depends on what code it fires once returning to Form A.
    Have you tried it with debug messages on to see what triggers it is firing? (both first time round & subsequently). Logically, I would have actually expected focus to return to Form A following the EXIT_FORM, but maybe I'm wrong ni thinking that.
    Have you experimented with the various WEB.SHOW_DOCUMENT options (e.g. WEB.SHOW_DOCUMENT(url, '_self') to get a different behaviour?

  • Focus issues between Applets on a web page

    I have a web page that contains two applets(A1 and A2) each containing a JTable with editable cells.
    If I click on an editable cell in the table in applet A1 so this I can change it and I then click on an editable cell in the table in applet A2, I now have both cells available to edit.
    This is not the intent as I would like the focus to shift from A1 to A2 and editing stop on A1.
    I have tried a focusListener on the applet but that never seems to get called.
    Does anyone have an example of how to accomplish this?
    Jim

    I will try the newer SDK.
    Could you offer an example of how to setup the focusListener given the an applet declaration of:
    public class SimpleTableApplet extends JApplet {
        public void init() {
        public void foobar() {
    }and so forth.
    I would prefer not chasing phantoms.
    Thanks,
    Jim

  • Event handling in applets

    Hi,
    I have a simple applet of a sound calculator. I have two events - one for capturing data from the buttons pressed on the applet and the other to output the sound associated with the button. However only one method is working ie: the sound! If I put the the sound method in comments however the other method works. Can somebody help me pls?
    import java.awt.*;
    import java.lang.*;
    import java.applet.Applet;
    //===================
    // Calculator Applet
    //===================
    public class Calc extends Applet
    // member
    TextField text;
    String sText1, sText2;
    double dReg1, dReg2, dMem;
    String sOperator;
    boolean isFixReg;
    Object arg;
    Button plus, minus, division, times, SQRT, changesign, getmemory, memorycancelled, memorysave, equals;
    Button numbers[], extras[];
    // constructor
    public Calc()
    Panel pFrame = new Panel();
    pFrame.setLayout(new FlowLayout());
    text = new TextField("");
    text.setForeground(Color.black);
    text.setEditable(false);
    Panel pCalc = new Panel();
    pCalc.setLayout(new BorderLayout(0, 10));
    pCalc.add("North", text);
    pFrame.add("Center", pCalc);
    Dimension dSize= pCalc.size();
    dSize.width = dSize.width + 20;
    dSize.height = dSize.height + 20;
    pFrame.resize(dSize);
    Panel pKey = new Panel();
    pKey.setLayout(new GridLayout(6, 3, 3, 3));
    add("Center", pKey);
    numbers = new Button [10];
              extras = new Button [2];
    pKey.add(extras[0] = new Button("C"));
    pKey.add(getmemory = new Button("MR"));
    pKey.add(memorycancelled = new Button("M-"));
    pKey.add(memorysave = new Button("M+"));
    pKey.add(numbers[7] = new Button("7"));
    pKey.add(numbers[8] = new Button("8"));
    pKey.add(numbers[9] = new Button("9"));
    pKey.add(division = new Button("/"));
    pKey.add(numbers[4] = new Button("4"));
    pKey.add(numbers[5] = new Button("5"));
    pKey.add(numbers[6] = new Button("6"));
    pKey.add(times = new Button("*"));
    pKey.add(numbers[1] = new Button("1"));
    pKey.add(numbers[2] = new Button("2"));
    pKey.add(numbers[3] = new Button("3"));
    pKey.add(minus = new Button("-"));
    pKey.add(numbers[0] = new Button("0"));
    pKey.add(extras[1] = new Button("."));
    pKey.add(equals = new Button("="));
    pKey.add(plus = new Button("+"));
    pKey.add(SQRT = new Button("SQRT"));
    pKey.add(changesign = new Button("+/-"));
    pCalc.add("South", pKey);
    setLayout(new BorderLayout(0, 0));
    add("North", pFrame);
    setBackground(Color.darkGray);
    dReg1 = 0.0d;
    dReg2 = 0.0d;
    dMem = 0.0d;
    sOperator = "";
    text.setText("0");
    isFixReg = true;
    // event handler
    public boolean action(Event event, Object arg)
    // numeric key input
    if ("C".equals(arg))
    dReg1 = 0.0d;
    dReg2 = 0.0d;
    sOperator = "";
    text.setText("0");
    isFixReg = true;
    else if (("0".equals(arg)) | ("1".equals(arg)) | ("2".equals(arg))
    | ("3".equals(arg)) | ("4".equals(arg)) | ("5".equals(arg))
    | ("6".equals(arg)) | ("7".equals(arg)) | ("8".equals(arg))
    | ("9".equals(arg)) | (".".equals(arg)))
    if (isFixReg)
    sText2 = (String) arg;
    else
    sText2 = text.getText() + arg;
    text.setText(sText2);
    isFixReg = false;
    // operations
    else if (("+".equals(arg)) | ("-".equals(arg)) | ("*".equals(arg)) |
    ("*".equals(arg)) | ("SQRT".equals(arg)) |("+/-".equals(arg))|("=".equals(arg)))
    sText1 = text.getText();
    dReg2 = (Double.valueOf(sText1)).doubleValue();
    dReg1 = Calculation(sOperator, dReg1, dReg2);
    Double dTemp = new Double(dReg1);
    sText2 = dTemp.toString();
    text.setText(sText2);
    sOperator = (String) arg;
    isFixReg = true;
    // memory read operation
    else if ("memorysave".equals(arg))
    Double dTemp = new Double(dMem);
    sText2 = dTemp.toString();
    text.setText(sText2);
    sOperator = "";
    isFixReg = true;
    // memory add operation
    else if ("getmemory".equals(arg))
    sText1 = text.getText();
    dReg2 = (Double.valueOf(sText1)).doubleValue();
    dReg1 = Calculation(sOperator, dReg1, dReg2);
    Double dTemp = new Double(dReg1);
    sText2 = dTemp.toString();
    text.setText(sText2);
    dMem = dMem + dReg1;
    sOperator = "";
    isFixReg = true;
    // memory sub operation
    else if ("memorycancelled".equals(arg))
    sText1 = text.getText();
    dReg2 = (Double.valueOf(sText1)).doubleValue();
    dReg1 = Calculation(sOperator, dReg1, dReg2);
    Double dTemp = new Double(dReg1);
    sText2 = dTemp.toString();
    text.setText(sText2);
    dMem = dMem - dReg1;
    sOperator = "";
    isFixReg = true;
    return true;
    public boolean handleEvent( Event event ) {
         if ( event.target == plus ) {
         play( getCodeBase(), "plus.au" );
         return true;
         if ( event.target == minus ) {
         play( getCodeBase(), "minus.au" );
         return true;
         if ( event.target == times ) {
         play( getCodeBase(), "times.au" );
         return true;
         if ( event.target == division ) {
         play( getCodeBase(), "division.au" );
         return true;
         if ( event.target == SQRT ) {
         play( getCodeBase(), "SQRT.au" );
         return true;
         if ( event.target == changesign ) {
         play( getCodeBase(), "changesign.au" );
         return true;
         if ( event.target == getmemory ) {
         play( getCodeBase(), "getmemory.au" );
         return true;
         if ( event.target == memorycancelled ) {
         play( getCodeBase(), "memorycancelled.au" );
         return true;
         if ( event.target == memorysave ) {
         play( getCodeBase(), "memorysave.au" );
         return true;
         if ( event.target == equals ) {
         play( getCodeBase(), "equals.au" );
         return true;
              for (int count = 0; count < numbers.length; count++){
                   if ( event.target == numbers[count] ) {
         play( getCodeBase(), "ding.au" );
         return true;
              for (int count = 0; count < extras.length; count++){
                   if ( event.target == extras[count] ) {
         play( getCodeBase(), "dong.au" );
         return true;
              return super.handleEvent( event );
    // Calculation
    private double Calculation(String sOperator, double dReg1, double dReg2)
    if ("+".equals(sOperator)) dReg1 = dReg1 + dReg2;
    else if ("-".equals(sOperator)) dReg1 = dReg1 - dReg2;
    else if ("*".equals(sOperator)) dReg1 = dReg1 * dReg2;
    else if ("/".equals(sOperator)) dReg1 = dReg1 / dReg2;
    else if ("SQRT".equals(sOperator)) dReg1 = Math.sqrt (dReg1);
    else if ("+/-".equals(sOperator)) dReg1 = -dReg1;
    else dReg1 = dReg2;
    return dReg1;
    }

    I take it you are talking about action and handleEvent, I don't see action called any place--I put it in the "find on this page" search and your declaration is the only place it is found, so could you post one where you actually make calls appropirately for each method (how you want them implemented) and use code tags?
    My old eyes, as well as others' on here, just don't pick that needle out of the haystack like they did when we were 20 years old.

  • File handling with applets

    I am trying to design am opinion poll applet in Java for my site. The poll consists of a CheckbokGroup and a "Submit" Button. On clicking "Submit" the proper percentage claculations are performed and written to an external file using byte streams. Now problem is that i get a security exception when the applet appempts to create the file. Please advice.
    Source Code
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    <applet code="Poll" width=144 height=500>
    </applet>
    public class Poll extends Applet implements ActionListener
    Checkbox cpp,java,assembly,vb,perl,asp;
    CheckboxGroup cbg;
    Label l1,l2,blank;
    Button submit;
    String q1="Which is your favourite";
    String q2="programming language?";
    boolean visible=true;
    public void init()
    setLayout(new GridLayout(9,1));
    l1=new Label(q1,Label.CENTER);
    l2=new Label(q2,Label.CENTER);
    blank=new Label("");
    cbg=new CheckboxGroup();
    cpp=new Checkbox("C/C++",cbg,false);
    java=new Checkbox("Java",cbg,false);
    assembly=new Checkbox("Assembly",cbg,false);
    vb=new Checkbox("Visual Basic",cbg,false);
    perl=new Checkbox("Perl",cbg,false);
    asp=new Checkbox("ASP",cbg,false);
    submit=new Button("Submit");
    add(l1);
    add(l2);
    add(cpp);
    add(java);
    add(assembly);
    add(vb);
    add(perl);
    add(asp);
    add(submit);
    submit.addActionListener(this);
    public void actionPerformed(ActionEvent ae)
    int index=-1;
    Checkbox temp=cbg.getSelectedCheckbox();
    if(temp==cpp) index=0;
    if(temp==java) index=1;
    if(temp==assembly) index=2;
    if(temp==vb) index=3;
    if(temp==perl) index=4;
    if(temp==asp) index=5;
    if(index!=-1)
    displayResults(index);
    void displayResults(int index)
    int size=7;
    byte buf[]=new byte[size];
    int pcent[]=new int[size];
    try
    InputStream fi=new FileInputStream("polldata.txt");
    fi.read(buf);
    fi.close();
    buf[index+1]++;
    buf[0]++;
    for(int i=0;i pcent[0]=buf*100/buf[0];
    try
    OutputStream fo=new FileOutputStream("polldata.txt");
    fo.write(buf);
    fo.close();
    }catch(FileNotFoundException fe)
    }catch(IOException ie)
    }catch(FileNotFoundException e)
    try
    for(int i=0;i<7;i++)
    buf[i]=0;
    OutputStream fi=new FileOutputStream("polldata.txt");
    fi.write(buf);
    fi.close();
    System.err.println("Here am I");
    //displayResults(index);
    }catch(FileNotFoundException ee)
    catch(IOException ee)
    }catch(IOException e)
    void graphResult(byte b[])
    //PLEASE IGNORE THE CODE IN THIS METHOD.
    //I STILL HAVE TO WRITE THE CODE FOR GRAPHICALLY
    //DIPLAYING THE RESULTS
    remove(l1);
    remove(l2);
    remove(cpp);
    remove(java);
    remove(assembly);
    remove(vb);
    remove(perl);
    remove(asp);
    remove(submit);
    submit.setLabel("O.K.");
    for(int i=0;i<8;i++)
    add(blank);
    add(submit);
    add(l1);
    add(l2);
    add(cpp);
    add(java);
    add(assembly);
    add(vb);
    add(perl);
    add(asp);
    add(submit);

    Are we talking about a local intranet site or a site on the web?
    If the answer is local, then it's a simple matter of mapping the drive.
    If the answer is the web, then you will need a server-side software (be it a servlet, cgi, asp, php, or whatever) to accomplish what you wanted to do.
    V.V.

  • Flex 4.5: null object reference error on focus handling

    The spark list in the following listing is only included in MyState1. If a CheckBox is checked, the MyState2 is set and therefore the spark list is removed from stage.
    If I run the application with debugger attached and i check a CheckBox and then focus out and focus in the browser's window there is an error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference
    at spark.components::Scroller/focusInHandler()[E:\dev\4.5.1\frameworks\projects\spark\src\sp ark\components\Scroller.as:1273]
    at flash.display::Stage/set focus()
    at mx.core::UIComponent/setFocus()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UI Component.as:9895]
    at mx.managers::FocusManager/activateHandler()[E:\dev\4.5.1\frameworks\projects\framework\sr c\mx\managers\FocusManager.as:689]
    This is the code of the application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application
         xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         initialize="application1_initializeHandler(event);">
         <fx:Script>
              <![CDATA[
                   protected function application1_initializeHandler(event:Event):void
                        addEventListener("myComboBoxChanged", testHandler);
                   private function testHandler(e:Event):void
                        currentState = "MyState2";
              ]]>
         </fx:Script>
         <s:states>
              <s:State name="MyState1"/>
              <s:State name="MyState2"/>
         </s:states>
         <s:List includeIn="MyState1">
              <s:dataProvider>
                   <s:ArrayList>
                        <fx:String>A</fx:String>
                        <fx:String>B</fx:String>
                        <fx:String>C</fx:String>
                   </s:ArrayList>
              </s:dataProvider>
              <s:itemRenderer>
                   <fx:Component>
                        <s:ItemRenderer>
                             <s:CheckBox label="CheckBox {data}" change="dispatchEvent(new Event('myComboBoxChanged', true));" />
                        </s:ItemRenderer>
                   </fx:Component>
              </s:itemRenderer>
         </s:List>
    </s:Application>

    Yes, there are all kinds of problems when you remove something from the screen that had focus (for instance, at that point you can't capture keyboard events either).
    My code is sprinkled with so many things to make sure something is in focus, I tend to forget that I've done it.
    In your code that changes the currentState, add
    this.setFocus()
    HTH;
    Amy

  • Buggy handling of APPLET tags in Netscape 6.1 ?

    I have run into an irritating problem - apparently a bug in the Netscape 6.1 browser...
    Consider the following code...
    <HTML>
    <script Language=JavaScript>
    function Test1()
    alert("The applet's current width is:" + document.applets[0].width);
    document.applets[0].width=500;
    alert("The applet should have been resized to 500 pixels width");
    </script>
    <BODY onClick="Test1()">
    <applet code="Test2.class" width="100" height="100" MAYSCRIPT name="app1" >
    </applet>
    </BODY>
    </HTML>
    The applet is a dummy applet
    Now I load this page in IE 6...I click the document body, and IE correctly reports the applet width as 100, and resizes the applet width to 500 pixels...
    Now I load the page in NS 6.1...The page loads correctly...But when I click the page, there is a slight delay, and then, the applet width is returned as "undefined" by JavaScript no matter how I refer to the applet, or where I place the script...
    Also, if I select VIEW >> PREFERENCES >> UNCheck ENABLE JAVA and then reload the Netscape browser, and then reload the page, the applet obviously does not load, but the size is reported correctly as 100...Then without closing the browser I reenable JAVA and then reload the page,the applet loads, the applet's width is reported correctly as 100, and even resizes...But if I close the browser, and then reload the page with JAVA "Pre-enabled" the "undefined" problem crops up again...
    I think this may be a serious bug in NS 6.1
    I would like to know other opinions on this matter
    Sincerely
    Srideep Prasad

    Netscape 7.02 works fine

  • Foms timer and item focus handling?

    Hi,
    I have a Forms that runs a repeating timer. The timer is fired every 2 minutes.
    My problem with the timer is that when the timer trigger fires it takes the focus from the current item on the forms, executes and then returns the focus. The returning of the focus means that the text in the item is highlighted (selected). If the user is currently entering data in the field, then after this highlight, pressing a key on the keyboard deletes all the previously entered data.
    I thoguht of using PJC and using a Java timer, but I am not shoure if this would eliminate this 'focus-feature' of forms and do not have much time.
    Is there a solution for this?
    Thank you in advance.

    We had a similar problem but it turned out to be caused by a sychronize command within the trigger code rather the trigger itself.
    In toher words it could be what you are doing and not the trigger itself.
    Regards,
    Mike

  • Suppress focus handling by JTable while editor os active

    I've a cell editor which supports auto-complete on ctrl-space. It is a JTextField with a child panel opened to allow selection between multiple choices.
    It works fine under Unix. But under Windows the key event will somehow start to shift focus away from the editor.
    I haven't found a way to track down who is actually triggering the focus movement.
    For this special key event it should be sufficient to let only the editor and its child working on the focus and keyboard event. What is the right way to disable the other components and not get involved in this sequence?

    Try this code :
              InputMap im = table.getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
              im.put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyEvent.CTRL_DOWN_MASK), "nothing_to_do");
              ActionMap am = table.getActionMap();
              am.put("nothing_to_do", new AbstractAction() {
                   public void actionPerformed(ActionEvent e) {
              });Tell me if it works.

Maybe you are looking for

  • The table name for the system generated transactions (Retained Earnings).

    Hi Gurus, I have a doubt and want to know from U experts there. Hope you won't let me down. The situation is I have created a new chart of account in our Oracle Financial. Uploaded 2007 transactions and opened year 2008 and closed all the periods of

  • Flash CS5, image from library in TLFTextField?

    I cannot seem to embed an inline image in a TLFTextField from the library.  Using the following snippet (with both a TLFTextField and a standard Dynamic TextField on the stage), the image appears ok in the Dynamic TextField, but no image in the TLFTe

  • Is there a way to setup a password so only i can clear my browse history?

    I want to customize the settings on my macbook pro so that only i have the ability to clear my browser's history (other ppl have access to my laptop, but i want this feature only to be available for me).

  • This is ridiculous "did not respond"

    I think it's ridiculous that you have to border on genius just to use a program that came with your computer. I love macs and will always use them but I can't believe I can download sightspeed and it works perfect without checking a thing yet can't u

  • Show Viewer Options abbreviates date to one number.

    In list view I can not get the date to expand even though I have unchecked the approximate date. Date created is listed as 9,. I have given the column plenty of space. Has anyone else had this problem. Does anyone have any ideas on how to fix it?