Focus should remains in the last column .

Hi,
I am using JTable with single row and few columns. When I navigate (tab) from last column it returns to the first column but my requirement is it should remain in the last column itself.
Thanks in advance.
Thanks and Regards,
Shiva

Okay, that makes sense. However, I modified my code to actually move the lead, and it still didn't work. Curious, I added a pop up window to the code, and I found out that it doesn't get called. The tab key still doesn't do anything. I miss KeyListeners already :(
Can you spot anything wrong with how I'm doing this?
InputMap im = _table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
KeyStroke tabKey = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
Action tabAction = new AbstractAction(){
               public void actionPerformed(ActionEvent e){
                    int leadColumn = _table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
                    leadColumn ++;
                    if(leadColumn > 4){
                         leadColumn = 4;;
                    _table.getColumnModel().getSelectionModel().setLeadSelectionIndex(leadColumn);
                    JOptionPane.showMessageDialog(null, "L: " + leadColumn);  //this doesn't happen either
im.put(tabKey, tabAction);

Similar Messages

  • Focus should remain at the command link

    I have Command links and I want to do everythibg(moving from one link to other and want to perform operation) using "tab" key instead of selecting it through mouse.
    when ever user selects the command link,one popup will be displayed
    ,under the popup,a dialog window of type "ok Cancel" was taken,in the dialog window one input text was taken.
    The Problem is without entering the text in the input text and clicking on ok button using tab,remains the focus of the cursor on the command link and
    also while clicking on the cancel button the cursor position remains at the command link only but
    when ever user enters the text in the input text and
    selects the ok button using tab,the cursor focus is moving to top of the page,not remains at the command link.This problem is not taking place while
    using mouse.
    Can anyone please tell me how to the remain the focus at the command link.
    I am using jdev 11.1.2.3

    Okay, that makes sense. However, I modified my code to actually move the lead, and it still didn't work. Curious, I added a pop up window to the code, and I found out that it doesn't get called. The tab key still doesn't do anything. I miss KeyListeners already :(
    Can you spot anything wrong with how I'm doing this?
    InputMap im = _table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    KeyStroke tabKey = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
    Action tabAction = new AbstractAction(){
                   public void actionPerformed(ActionEvent e){
                        int leadColumn = _table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
                        leadColumn ++;
                        if(leadColumn > 4){
                             leadColumn = 4;;
                        _table.getColumnModel().getSelectionModel().setLeadSelectionIndex(leadColumn);
                        JOptionPane.showMessageDialog(null, "L: " + leadColumn);  //this doesn't happen either
    im.put(tabKey, tabAction);

  • How do I create a new row on tab out of the last column, last row?

    JDev 11.1.2.1.0.
    I've seen a few topics on this but none that I think were really very good solutions.
    Use Case:
    On tab out of the last column in the last row, a new row should be added to the end of the table. Bonus points for setting the focus to the first <af:inputText> of the newly created row.
    Complications:
    1. I'm having a heck of a time trying to find a function that returns the column's displayed index. Sadly, <column binding>.getDisplayIndex() returns -1 unless the user has manually re-ordered the column.
    2. Value Change Listeners only fire if there is a value change. Guess that means I need to do client/server listeners to check each and every <af:inputText> for a tab press?
    3. I'm not even going to get into setting the focus. With all the templates, regions, etc. going on, it's dang near impossible.
    Any ideas on how to attack this one?
    Will

    Hi,
    You will need to use the Run Engine Installation Wizard found on the Tools menu. In addition you need to create a installation set for the operator interface.
    Look at Chapter 16 Distrubuting TestStand ( chapter 17 for version 2).
    Once you have created your installation, install is on your new system.
    The serial number etc is part of the process model. When you run the entry point 'Test UUTs' the PreUUT callback is executed which asks the user for the serial number.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • A special character in the last column in my external table

    Hello,
    I'v made a external table that looks like this :
    CREATE
    TABLE "REC_XLS"
    "FINANCE_DATE" VARCHAR2(50 BYTE),
    "CREATION_DATE" VARCHAR2(50 BYTE),
    "SENT_DATE" VARCHAR2(50 BYTE),
    "REMARKS" VARCHAR2(200 BYTE),
    "REMAINING_QUANTITY" VARCHAR2(30 BYTE),
    "CODE" VARCHAR2(30 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "LOADER" ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline LOAD WHEN CODE!=BLANKS Skip 1 FIELDS
    TERMINATED BY 0X'09' MISSING FIELD VALUES ARE NULL REJECT ROWS
    WITH
    ALL NULL FIELDS ( Finance_date,
    creation_date, sent_date, Remarks,
    remaining_quantity, code) location ( 'Finance.tsv' )
    I exported the result in xls file and I saw in the last column a special character. The result of a copy and paste is prenseted here : "ABE
    You should notice that the last quote is in the upper line instead of at the end of ABE. This means, I think, that there is a carriage return at the end. And the 0X'09' is the tab separator. How can I get rid of this character ?

    my guess is that you run the load on unix server which uses default LF end-of-line character and the file has dos CRLF end-of-line, the easiest option is to change records delimiter in the DDL and replace "RECORDS DELIMITED BY newline" with code below
    RECORDS DELIMITED BY '\r\n'in general end-of-line can be really any character, sample above shows CRLF but it can be TAB, space, | or any other character or set of characters. I have samples of special characters on my blog http://jiri.wordpress.com/2009/01/29/oracle-external-tables-by-examples-part-1/
    hope this helps
    jiri

  • Is there a way to make the last column in finder auto expand?

    I know that you can double click the double bar at the bottom right . . . but can't the finder be set to auto expand on the last column so i don't have to click that thing every time i wish to see the long named files ?
    Perhaps i should just use Bridge but it seems so slow and cumbersome compared to Finder.
    thanks for any advice.
    PS . . . is this available on the newest OS . . . going to upgrade one of these days.

    No, the finder's column view does not have auto resizing columns.
    It does have auto condensing of file names for the narrow display.
    Which is what you are trying to overcome.
    To accomplish your task, switch to list view.
    Select your file. Then switch back to column view.
    The trick is to learn your FINDER command key short cuts.
    command 1 = icon view
    command 2 = list view
    command 3 = column view.
    So you would press [command] and [3] to view the columns.
    Navigate about until you get a column of unhelpfully condensed names.
    Switch to list view by pressing [command] and [2]
    Select the file from the fully displayed names list.
    At this point you can press [command] [down arrow] OR [command] [o] to enter/open the selected item;
    or Switch back to column view by pressing [command] and [3] then continue browsing deeper.

  • How to get the last column info of the given table

    Hi All,
    I want to get the last column information like :
    column name, datatype of the last column in the given
    table use PL statement. Please help.
    Thanks,
    JP

    SCOTT@orcl SQL> desc emp
    Name                                                  Null?    Type
    EMPNO                                                 NOT NULL NUMBER(4)
    ENAME                                                          VARCHAR2(10)
    JOB                                                            VARCHAR2(9)
    MGR                                                            NUMBER(4)
    HIREDATE                                                       DATE
    SAL                                                            NUMBER(7,2)
    COMM                                                           NUMBER(7,2)
    DEPTNO                                                         NUMBER(2)
    SCOTT@orcl SQL> select column_name, data_type from user_tab_columns
      2  where table_name = 'EMP'
      3  and column_id = (select max(column_id) from user_tab_columns
      4  where table_name = 'EMP');
    COLUMN_NAME                    DATA_TYPE
    DEPTNO                         NUMBER
    SCOTT@orcl SQL>                                                                      

  • Unable to filter the report by clicking the last column's name

    Hi,
    I have interactive report page having lots of column. All columns were not fitting in the screen so I added a code in the region--- header and footer section---
    <div style="overflow: auto; width: 1220px; height: 700px;">
    I got a scroll bar at the bottom. But a new problem arised. When I am trying to filter the report by clicking the column name in the report page , a popup is opening for the first column but the pop up is not opening for the last column. For the middle columns, the popup is opening but not below its name. This pop is for filtering the report based on that columns.
    Please give some idea to fix this bug.
    Thanks,
    Chandra Bhanu

    You could try to display as many columns as fit your screen, and put the rest of your columns as form fields in a detail view, somewhat like this:
    http://apex.oracle.com/pls/apex/f?p=vincentdeelen:report_details_in_iframe_v1
    Please tell the steps how to do it.
    Thanks,
    Chandra Bhanu

  • Finder in column view has no expander divider on the last column

    I deal with a lot of graphics on my computer and I have a lot of subfolders. While in finder in column view there is no expanding divider for the last column when it is showing a graphic. When I first open a photo or graphic in finder the last column shows the graphic smaller than regular size. In SL there was a column divider to expand only that last column so I could make the graphic larger to see it better. Now in Lion there is no divider on the right side of that last column to expand the last column where the grahic is showing. In order for it to finally expand I have to drag the right side of the Finder window all the way across my display until the bottom slider bar disappears and then that last column will expand. This is frustrating having to have my Finder all across my display just to get the graphic larger.
    Is there a way to get an expander divider to show up for the last column when viewing a graphic in column view? I know I can click on the "eye" icon to see it, but the column view will expand the graphic larger than 100% so I can see more details.
    Thanks for any and all help.
    Connie

    Yes, that is how my whole finder window expands across my display until the bottom slider bar disappears....then and only then does the last column expand. I have to have open as many as 8 columns to get to my graphic. Keeping the Finder window to a smaller size and using the bottom slide bar to navigate to the far right column is nice, but all I want is that far right column where my graphic is showing to expand so I can see it better.
    Thanks but what you suggest only resizes the whole Finder window until it can expand no further, then the last column expands the graphic. But then my whole display is a huge Finder window.

  • Issue with the last column stretching in ADF table

    There is an issue wherein when  I try stretching the last column of the ADF table to reduce its width it does stretch. But whenever I try stretching it back to this original position it doesn't despite having columnstretching attribute set to multiple and assign widths in percentages to columns . When I set the columnstretching attribute to none, the last column does stretch back and forth but on page load the table does not stretch to its full width despite having styleClass="AFStretchWidth". Now I dont want to be assigning fixed width in pixels to the columns. I would want the last column to stretch back and forth with columnstretching="multiple" and styleClass="AFStretchWidth". I see the same issue on components demo page as well. Tag Guide

    If you are trying that each column gets equally stretched based on the browser, its not possible as adf doesn't supports that.
    If your table is not stretching use styleClass="AFStretchWidth".
    But if all your columns are not stretching you can only try setting column widths + columnStretching property (where you can specify which column to stretch to fill all the spaces)
    Amit

  • Default Carriage return in the last column when data is downloaded to Excel

    Problem:
    When you download data into Excel and if the last column of your excel is a numeric field, XMLP will add a carriage return (special character) to your numeric field. This feild will be considered as character field by excel.
    Work Around:
    When you build the template, create an empty column as your last column and leave E (or end-for-each) in that empty column.
    Note:
    If the last column is a character column then you do not have to do this.

    I originally had that END:VCARD without any carriage return.
    But I still get an extra carriage return at the end when the JSP renders to VCF
    I'm using Tomcat running on Linux.
    I found this, article which implies (but does not explicitly say) JSP in general adds a newline to the last line:
    http://www.caucho.com/resin-3.0/jsp/faq.xtp (But its not tomcat either, so maybe this info is irrelevant).
    Edited by: shogo2040 on Dec 22, 2008 3:31 PM - changed rendered to VCF from rendered to JSP

  • How do I get the last COLUMN in an Excel Sheet using Report Generation toolkit in LV7.1?

    I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
    Thanks

    Hello –
    I think the following example program might be helpful to get you started programming your application.
    Get Excel Data from Specified Field.
    Hope this helps!
    SVences
    Applications Engineer
    National Instruments

  • Emacs is displaying the first column of the line on the last column of the previous line

    The first column of my lines are being displayed on the last column of the previous line. This a very irritating glitch that I have no clue how to fix or even troubleshoot. (red bars were added using preview to hide personal info)
    I've downloaded MacPorts and reinstalled emacs:
    GNU Emacs 24.4.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    GNU Emacs comes with ABSOLUTELY NO WARRANTY.
    You may redistribute copies of Emacs
    under the terms of the GNU General Public License.
    For more information about these matters, see the file named COPYING.
    I'm open to any suggestions on how to fix this graphical glitch.
    Much thanks
    Message was edited by: Conner_36

    Given that the Emacs for OS X works ok and the Emacs shipped with OS X works it would seem to be some issue with MacPorts and their version.
    Totally unfamiliar with MacPorts so have no idea how the program gets compiled,what libraries it is using and what if any config settings are needs or set so I'm afraid I won;t be much help there.  That you are on a MBP with a retina display may be part of the problem.
    So with the setup you have now, hardware and software including OS,  it was working and then just like that it stopped? Something much have changed around the time it stop working if you can think back to then it might help you resolve the problem.
    As you are doing programming can i assume you have Xcode and the command line tools installed? If not how do you compile your code? The reason I ask is compiling Emacs from there GNU source is not all that difficult. It might be worth trying that.
    One last thing given that the two other versions of Emacs displayed the file OK this strongly suggests the problem is not in your .emacs file or your environment however as I wrote I am not familiar with MacPorts so it is possible there is another config file messing you up. As a test for this create a new user or log in as the Guest user (this is best as you;re guaranteed the environment is clean) and look at the file in question in MacPorts Emacs. If it displays OK then there is something in your environment causing this, If it messes up  even in the new user then I'd say ditch MacPorts..
    regards
    <edit>
    Just to rule out init files  if you start emacs with the -q(minus que) flag the .emacs file is not read in, if you use  --no-site-file it will not load the site file if it exists.
    I'd try running the MacPorts emacs with those two flags to see f anything changes.

  • Know the Last column of the table

    Hello 
    i use vb.net with excel
    I have a table
    with a spreadsheet, I want to know the Last
    column of the table 
    please help me ??

    i have a table in Excel file and i want to add the last column of this table in datagridview 
    i want to set ShtRange to give me the last column 
    i use this but don't give me a result 
    With Form1.xlWorkSheet
    Dim ShtRange As Range
    Dim dt As New System.Data.DataTable
    ShtRange = Form1.xlWorkSheet.Cells(1, Form1.xlWorkSheet.Columns.Count).End(XlDirection.xlToLeft)
    For Cnum As Integer = 1 To ShtRange.Columns.Count
    dt.Columns.Add(New DataColumn(TryCast(ShtRange.Cells(1, Cnum), Excel.Range).Value.ToString()))
    Next
    dt.AcceptChanges()
    Dim columnNames As String() = New String(dt.Columns.Count - 1) {}
    For i As Integer = 0 To dt.Columns.Count - 1
    columnNames(0) = dt.Columns(i).ColumnName
    Next
    For Rnum As Integer = 2 To ShtRange.Rows.Count
    Dim dr As DataRow = dt.NewRow()
    For Cnum As Integer = 1 To ShtRange.Columns.Count
    If TryCast(ShtRange.Cells(Rnum, Cnum), Excel.Range).Value2 IsNot Nothing Then
    dr(Cnum - 1) = TryCast(ShtRange.Cells(Rnum, Cnum), Excel.Range).Value2.ToString()
    End If
    Next
    dt.Rows.Add(dr)
    dt.AcceptChanges()
    Next
    Me.DataGridView1.DataSource = dt
    End With
    this is my table :

  • How to avoid that the last column in a datagrid increase the width out of the window?

    I have a datagrid with this configuraction:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}"/>
    </DataGrid.Columns>
    The last column is a description, so the text can be a bit large. so I would like that the width don't be wnough greater than makes the datagrid has a width out side the window.
    For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    The code that I have used in this case is:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    I am using visual studio community edition and wpf 4.5.1.
    Thank so much,

    >>For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    Can't you just set an explicit width for the first two columns then?, e.g.:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    There is also a MinWidth property that you can use to prevent the columns from being to narrow:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • I downloaded the os 6 by wifi and when the phone restarted it told me to plug into itunes. I did that and the iphone software update has been stuck on '70 hours remaining' for the last 3 hours. Help!

    I downloaded the os 6 by wifi and when the phone restarted it told me to plug into itunes. I did that and the iphone software update has been stuck on '70 hours remaining' for the last 3 hours. Help!

    it says " itunes has detected an iphone in recovery mode. you must restore this iphone before it can be used with itunes" so i restore it and after it gets finished it says " the iphone :iphone" could not be restored. the device cannot be found" but ive used this itunes since i got this phone.

Maybe you are looking for

  • Creation of Service Notification  No for SO.

    Hi everyone, I am working on the User Exit for the first time. Kindly help me out with the following requirement. When a sales order is saved, create a service notification and link to the sales order header. To fulfill this requirement we need to us

  • Upload original error:Error while checking in and storing

    Hello,experts. write a RFC for upload original of document. test the RFC with SE37,no problem. same importing parameter values, call the RFC in c++, hint: Error while checking in and storing: 172.xx.xxx.xx/000000000002641. in the function,tracing imp

  • Instructions to clean install Yosemite to a fusion drive

    Hi everyone this is Chris. I have recently purchased a new i mac 27 inch with a 1tb fusion drive. When i tried clean installing yosemite to the fusion drive i noticed that only the 1tb mechanical hard drive appeared. The 128gb ssd portion was missing

  • DME file creation for APP

    Hi all, my client needs to do the payments for vendors in electronic format. for this i know only for electronic payments we use file DME. How we create DME file in F110? and how this file fits for bank given specification? after payments made from b

  • Help needed with SelectOneMenu

    Hi, I have a quick, silly question. I'm trying to use a DataTable which has a column populated with a SelectOneMenu for each row. All the SelectOneMenu's contain the same selectable items. My problem is that when ever you try to change the selection