JTable not working in JDK 1.6

Hi
In my Application I am using JTable for diplay and sorting purpose.Its properly working with JRE 1.5.
But When i try to run the same application in JRE 1.6 the sorting functionality is not working properly.
plz let me know what is the difference between running the application in JRE 1.5 and JRE 1.6?
Thanks in Advance
Kumar

Pls. post the SSCCE program.

Similar Messages

  • Why Oracle 8i is not Working with JDK 1.3

    Why Oracle 8i is not Working with JDK 1.3 by using JDBC.

    try this
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:"somedsn","scott","tiger");
    I am using this for Oracle, it is working for me.
    Uma
    Java Developer
    http://www.globalleafs.com

  • Tomcat 4.1.x not working under JDK 1.2.2

    We are trying to test our web application on all versions of JDK starting from 1.2.2. We use Tomcat as the servlet engine and after upgrading from Tomcat 3.2.x to 4.1.24 (we've tried 4.1.18 as well) we have noticed that the new Tomcat does not start under JDK 1.2.2, see command line output below. We've tried on several machines and it fails with the same Exception. Has anyone tried running Tomcat 4.x on JDK 1.2.x? We find it hard to believe that a product like Tomcat would fail to support JDK 1.2, so any information would be appreciated.
    C:\Java\jakarta-tomcat-4.1.24\bin>catalina.bat run
    Using CATALINA_BASE: ..
    Using CATALINA_HOME: ..
    Using CATALINA_TMPDIR: ..\temp
    Using JAVA_HOME: c:\java\jdk1.2
    Bootstrap: Class loader creation threw exception
    java.lang.IllegalMonitorStateException: current thread not owner
    at org.apache.catalina.loader.StandardClassLoader.addRepositoryInternal(StandardClassLoader.java, Compiled Code)
    at org.apache.catalina.loader.StandardClassLoader.<init>(StandardClassLoader.java, Compiled Code)
    at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java, Compiled Code)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java, Compiled Code)

    I had the same problem.
    No Tomcat 4.1.x is not working under JDK1.2.2.
    It has something to do with a difference in byte code of the classes between jdk1.2.2 and jdk 1.4.
    I am running now on J2SDK1.4.1_03 and have no problems any more

  • HAT 1.1 and HPROF not working with JDK 1.5

    I'm using JDK 1.5.0_05, and I run HPROF with these args passed to the JVM:
    -Xrunhprof:heap=sites,depth=8,monitor=n,thread=n,doe=y,format=b
    When I try to read the binary file output I get the following error:
    C:\dev\142\sfdc>java -jar c:\HAT\bin\hat.jar c:\dev\142\sfdc\java.hprof
    Started HTTP server on port 7000
    Reading from c:\dev\142\sfdc\java.hprof...
    Dump file created Thu Feb 09 17:10:38 PST 2006
    Snapshot read, resolving...
    Resolving 0 objects...
    WARNING: hprof file does not include java.lang.Class!
    Exception in thread "main" java.lang.NullPointerException
    at hat.model.JavaClass.resolve(JavaClass.java:68)
    at hat.model.Snapshot.addFakeClass(Snapshot.java:73)
    at hat.model.Snapshot.resolve(Snapshot.java:111)
    at hat.Main.main(Main.java:158)
    I've also tried using JDK 1.5.0_04 and JDK 1.5.0_01. I've reduced the depth param to depth=4. Nothing gets rid of that error.
    Can HAT work with JDK 1.5?

    Ok, I finally managed to solve this problem. What was happening was that IPv6 was installed on this computer, and as a result Java was trying to do a DNS lookup using a IPv6 socket and failing. With the help of TracePlus Winsock, I discovered that internall Java's InetAddress.getByName does this:
    WSAStartup
    socket(INET6)
    getaddrinfo
    WSACleanup
    Two solutions are possible - either set the system preference java.net.preferIPv4Stack to true, or uninstall the IPv6 stack. Since I couldn't find a way to set the system preference in a persistent manner (apart from passing in an argument on the java command line), I uninstalled the IPv6 stack.
    Hope this helps someone else.
    Peter

  • XSLT with java extensions not working with jdk 1.6

    Hi,
    in as XSL transformation I'm using java functions in some cases. With jdk1.5 this works fine. But when switching to jdk1.6 it seems the java classes are not properly initialized.
    See following simple XSL:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java">
         <xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
         <xsl:template match="/">
         <xsl:variable name="counter" select="java:java.util.Vector.new()"/>
         <xsl:variable name="temp1" select="java:add($counter,'1')"/>
         <xsl:variable name="temp2" select="java:add($counter,'2')"/>
         <xsl:variable name="temp3" select="java:add($counter,'3')"/>
         <xsl:value-of select="java:size($counter)"/>
         <xsl:value-of select="java:toString($counter)"/>
         </xsl:template>
    </xsl:stylesheet>
    With jdk 1.5 it creates following output:
    3
    [1, 2, 3]
    With jdk 1.6 I get:
    0
    So I can access the object in jdk 1.6 but adding doesn't work.
    Anybody has an idea what could be wrong or how to fix this?

    thanx this is the solution. With this construct
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java">
         <xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
         <xsl:template match="/">
         <xsl:variable name="counter" select="java:java.util.Vector.new()"/>
         <xsl:variable name="temp1" select="java:add($counter,'1')"/>
         <xsl:variable name="temp2" select="java:add($counter,'2')"/>
         <xsl:variable name="temp3" select="java:add($counter,'3')"/>
         <xsl:variable name="temp4" select="$temp3"/>
         <xsl:value-of select="java:size($counter)"/>
         <xsl:value-of select="java:toString($counter)"/>
         </xsl:template>
    </xsl:stylesheet>
    at least the '3' is added to the vector.

  • MessageFormat with arguments not working in jdk 6

    I cant get the date to be formatted when using Jdk 6. Has something changed? Or am i using it in a non-standard way that gives this error.
    I have run this test in Jdk 1.5.0_10 and 1.6.0_02.
    And it fails in the 1.6.0_02.
    This is a JUnit 4 testcase.
    import java.text.MessageFormat;
    import java.util.Date;
    import java.util.Locale;
    import org.junit.Test;
    * This test the MessageFormat for usage.
    * A bug in jdk 1.6.0 seams to be the problem.
    * @author robert.alexandersson
    public class LanguageJDKVerificationTest {
         private static long time = 1000555500115L;
         @Test
         public void formatDate(){
              String formatString = "Date {0}";
              Date date = new Date();
              date.setTime(time);
              Object[] args = new Object[]{date};
              Locale locale = new Locale("sv_se");
              MessageFormat format = new MessageFormat(formatString, locale);       
             String formatted = format.format(args);                
             assertEquals(formatted, "Date 2001-09-15 14:05");
    }

    Hi there and thanx for answering.
    I researched a little more.
    The problem seams to be that the JDK 6 does not support sv_se as an input for langauge.
    BUT, the older JDK:s (1.4 or 5) did this.
    I would consider this as a backwards compatablility bug. They(SUN API:s) never said it would work with sv_se but it did anyway.
    It does however not seem to be the Locale that handles this different so its propably the DateFormat that is somehow different in its implementation.
    The sv_se is the "programmatic" version of the Locale, and this might be why it worked earlier on.

  • SetMnemonic for JCheckBox not working in JDK 1.4.1

    I was wondering if anyone has run across this problem. The only thing I could find on the subject in the forums had to do with HTML underlining issues.
    In JDK1.4.1, trying to do a setMnemonic on a JCheckBox component doesn't work. The symptoms are that the entire dialog box doesn't display. If I comment out the setMnemonic method, the dialog displays fine. No exceptions are being thrown. setMnemonic works for other button components, JButton, JRadioButton, but seems to be broken for JCheckBox. I even tried the char version, which is now deprecated, but that didn't work either. Has anyone run across this problem?
    setDisplayedMnemonicIndex works, but that doesn't make the component respond to the keyboard. It just underlines the requested character.
    Thanks.

    Tell who told java.io.File not in JDK 1.4. It is available in 1.4. This java.io.File extends from the java.lang.Object. So pls check in ur 1.4 API .

  • Weblogic console not work after JDK reinstalled

    Hi all:
    After i reinstalled JDK 1.3.1, the weblogic console doesn't work any
    more. Previously i am using jdk1.3, and the console works.
    Weblogic server itself can run without any effect. But now when i
    click console in windows startup menu, the error msg is "WEblogic Err
    Occurred: Java dll not found. Bad value for JAVA_HOME................".
    After i copied javai.dll into the every possible folder, it still
    compliants this error.
    What is happenning here? Do i have to reinstall weblogic? Actullay i
    try to do that, but weblogic asks me to remove the previous installation
    first, and make sure to remove some windows registration
    items..............headache!
    Does any one know how to get around this? Seems the sonsole is using
    windows specific infor inclduing dll and registration.......etc.
    Thanks.
    minjiang

    Ok, partly i solved the problem. Now i can run weblogic console by using
    startconcole.cmd file, not the other one called weblogic\bin\wlconsolew.exe
    (although previously i can).
    Don't know what caused this.
    Thanks.
    minjiang
    minjiang wrote:
    Hi all:
    After i reinstalled JDK 1.3.1, the weblogic console doesn't work any
    more. Previously i am using jdk1.3, and the console works.
    Weblogic server itself can run without any effect. But now when i
    click console in windows startup menu, the error msg is "WEblogic Err
    Occurred: Java dll not found. Bad value for JAVA_HOME................".
    After i copied javai.dll into the every possible folder, it still
    compliants this error.
    What is happenning here? Do i have to reinstall weblogic? Actullay i
    try to do that, but weblogic asks me to remove the previous installation
    first, and make sure to remove some windows registration
    items..............headache!
    Does any one know how to get around this? Seems the sonsole is using
    windows specific infor inclduing dll and registration.......etc.
    Thanks.
    minjiang

  • JTable not working with tableChanged

    Hi,
    I have a JTable and I use table model. I also use TableCellRenderer. Now when i use tableChange() method the method getValueAt(int nRow, int nCol) in the model is called recursively forever. It starts with row zero to row 7 and then starts again. I have spent quite some time on it and have been unable to solve it. Please help me.
    thanks.
    class StockTableData extends AbstractTableModel {}
    table.setModel(m_data);
              for (int k = 0; k < m_data.getColumnCount(); k++ ) {     
                   System.out.println("k is " + k);
                   TableCellRenderer renderer = new TextAreaCellRenderer();
                   TableColumn column = new TableColumn(k,     StockTableData.m_columns[k].m_width, renderer, null);
                   table.addColumn(column);
    class TextAreaCellRenderer extends JTextArea implements TableCellRenderer {
         protected static Border m_noFocusBorder = new EmptyBorder(1, 1, 1, 1);
         protected static Border m_focusBorder = UIManager.getBorder("Table.focusCellHighlightBorder");
         public TextAreaCellRenderer() {
              setEditable(false);
              setLineWrap(true);
              setWrapStyleWord(true);
              setBorder(m_noFocusBorder);
         public Component getTableCellRendererComponent(JTable table,
              Object value, boolean isSelected, boolean hasFocus,
              int nRow, int nCol)
              if (value instanceof ColorData) {
                   ColorData cvalue = (ColorData)value;
                   setText(cvalue.m_data.toString());
                   setBackground(isSelected && !hasFocus ?
                        table.getSelectionBackground() : table.getBackground());
                   setForeground(isSelected && !hasFocus ?
                        table.getSelectionForeground() : cvalue.m_color);
                   setFont(table.getFont());
                   setBorder(hasFocus ? m_focusBorder : m_noFocusBorder);
                   // Adjust row's height
                   int width = table.getColumnModel().getColumn(nCol).getWidth();
                   setSize(width, 1000);
                   int rowHeight = getPreferredSize().height;
                   System.out.println("-- ");
                   if (table.getRowHeight(nRow) != rowHeight)
                        table.setRowHeight(nRow, rowHeight);
              return this;
         // To fix JDK bug
         public String getToolTipText(MouseEvent event) {
              return null;

    viravan, you are right. You really think so?
    but am not sure how and when to set the table row height.I do it in the setValueAt method by adding the following:
         public void setValueAt(Object value, int row, int column) {
            TableCellRenderer renderer=getCellRenderer(row,column);
            Component c=renderer.getTableCellRendererComponent(this,value,true,true,row,column);
            Dimension size=c.getPreferredSize();   // the height is what you want hereYou can see my program at http://www.aokabc.com
    ;o)
    V.V.
    PS: If it helps, don't forget the dukes

  • JTable not  working

    Hi,
    Sorry to ask again about JTable but i can't understand what's wong.
    The code above is well compiled but when running the computer frose without displaying the frame(not responding).
    public class ex extends JFrame
      JTable table;
      JTable tab;
      public static void main(String[] args)
         new ex();
      public ex()
        Object[][] A=new Object[][]{{"1","2"},{"!","@"}};
        String[] Col=new String[]{"col1","col2"};
        JTable tab=new JTable(new MyTableModel(A,Col));
        JScrollPane tablePanel;
        table=tab;
        tablePanel=new JScrollPane(table);
        this.getContentPane().add(tablePanel);
         this.setSize(500,300);
        this.show();
    class MyTableModel extends DefaultTableModel
      public MyTableModel(Object[][] cells, Object[] headers)
        super(cells, headers);
      public Class getColumnClass(int col)
        return getValueAt(0, col).getClass();
      public boolean isCellEditable(int row, int col)
         return false;
    }Pls help.

    Hi there,
    Here is the code:
    The getTable() is called from another class dealing the connection.
    Also askApotelesmata() sends a message to the server, which call getTable and send him to the client.
    Server:
    class Apotelesmata
      static String[] Col;
      static Object[][] A;
      static int max=100;
      static int counter=0;
      public static void addApotelesma(Point p,ImageIcon e,ImageIcon a,boolean s)
        Col=new String[]{"������� ��������","��������","��������","�������� �����"};
        A=new Object[max][4];
        A[counter][0]=new String(p.x+"."+p.y);
        A[counter][1]=e;
        A[counter][2]=a;
        A[counter][3]=new Boolean(s);
        counter++;
      public static JTable getTable()
        JTable tab=new JTable(new MyTableModel(A,Col));
        return tab;
    class MyTableModel extends DefaultTableModel
      public MyTableModel(Object[][] cells, Object[] headers)
        super(cells, headers);
      public Class getColumnClass(int col)
        return getValueAt(0, col).getClass();
      public boolean isCellEditable(int row, int col)
         return false;
    }Client:
    class StudentStats extends JFrame implements ActionListener
      StudentConnect sc;
      JTable table;
      JScrollPane tablePanel=new JScrollPane();
      public StudentStats(StudentConnect sctmp)
        try
          sc=sctmp;
          JButton load=new JButton("���� ������� ����������");
          JButton save=new JButton("���������� ������� ����������");
          load.addActionListener(this);
          save.addActionListener(this);
          JPanel panel=new JPanel();
          panel.setLayout(new GridLayout(1,2));
          panel.add(load);
          panel.add(save);
          sc.askApotelesmata();   
          table=(JTable)sc.in.readObject();
          tablePanel=new JScrollPane(table);
          this.getContentPane().setLayout(new GridLayout(2,1));
          this.getContentPane().add(tablePanel);
          this.getContentPane().add(panel);
          this.setSize(500,300);
          this.show(); 
       catch(IOException e)
          new AlertWin(e.toString());
       catch(ClassNotFoundException e)
         new AlertWin(e.toString());
       catch(Exception e)
         new AlertWin(e.toString());
      public void actionPerformed(ActionEvent e)
        String comand=e.getActionCommand();
        if (comand.equals("���� ������� ����������"))
          this.dispose();
          new StudentStats(sc);
        else if (comand.equals("���������� ������� ����������"))
           try
             ObjectOutputStream oos=new ObjectOutputStream(new FileOutputStream(new File(sc.studentName)));
             oos.writeObject(table);
           catch(IOException ee)
             new AlertWin(ee.toString());
    }Here is the problem:
    It is well compiled.
    It is working fine when the table has only 1 row.
    When the table has more than 1 row the client freezes.
    Pls, i need some help.
    Thanx in advance

  • DNS Resolver not working with JDK 1.5.0_6 and Windows 2003

    I have a Windows Server 2003 machine which now has Java JDK 1.5.0_6 installed on it. Somehow the DNS resolver doesn't work - every call to InetAddress.getByName("host") throws an UnknownHostException. I've tried de-installed java and re-installing, but the problem remains. No traffic seems to be generated (i.e. no packets to port 53) when getByName() is called. I don't have any kind of firewall on the Windows Server 2003 machine.
    Has anyone ever seen this kind of behaviour / problem before and know of a solution?
    Thanks,
    Peter

    Ok, I finally managed to solve this problem. What was happening was that IPv6 was installed on this computer, and as a result Java was trying to do a DNS lookup using a IPv6 socket and failing. With the help of TracePlus Winsock, I discovered that internall Java's InetAddress.getByName does this:
    WSAStartup
    socket(INET6)
    getaddrinfo
    WSACleanup
    Two solutions are possible - either set the system preference java.net.preferIPv4Stack to true, or uninstall the IPv6 stack. Since I couldn't find a way to set the system preference in a persistent manner (apart from passing in an argument on the java command line), I uninstalled the IPv6 stack.
    Hope this helps someone else.
    Peter

  • The obfuscating tool Dasho not working with jre 1.5

    I have a issue that Dasho (newer and old versions )does not work with JDK 1.5 . Earlier we used JDK1.4 version in which it works.
    Have anyone faced this issue or worked the dasho please give some idea .

    We made the move from DashO to yGuard (for various reasons)
    before we made the move from JDK 1.4 to JDK 1.5.
    Google suggests DashO supports JDK 1.5, even JDK 1.6; [DashO change log|http://www.preemptive.com/dasho-change-log.html].
    Preemptive Solutions offer support.

  • Mouselistner is not working with jtable in the browser

    Hi
    I am having a problem with jTable.
    I added a mouselistener to table header to sort table but when i run that applet from my netbean ide it works fine but when i run that applet in my browser it doesn't work, i have tested, its not even generate mouseclick event .Please help me guys.
    I call this function after calling initComponents() method of JApplet.
    public void setTableAction()
    //set mouselistener to sort table on click of table header
    final JTableHeader head= jTable1.getTableHeader();
    head.addMouseListener(new java.awt.event.MouseAdapter()
    public void mouseClicked(java.awt.event.MouseEvent evt)
    Vector data= ((DefaultTableModel)jTable1.getModel ()).getDataVector();
    sortTable(data, head.columnAtPoint(evt.getPoint()));
    //set action map to change the default action performed for enter key pressed
    InputMap imap = jTable1.getInputMap(JTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    KeyStroke enterKey = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
    KeyStroke tabKey = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
    final Action oldAction= jTable1.getActionMap().get(imap.get(tabKey)); // get map to set enter key.
    imap.put(enterKey, "enter"); // set enter key
    Action newAction = new AbstractAction(){
    public void actionPerformed(ActionEvent e) {
    oldAction.actionPerformed(e);
    JTable table= (JTable)e.getSource();
    table.changeSelection(0,0,false,false);
    if(table.isCellEditable(0,0))
    String sTemp= (String)table.getValueAt(0,0);
    if(sTemp.length()>0) {
    if(bRenewItem)
    retrieveRcodeDetails("",sTemp);
    else
    processRCodeDetails(sTemp, e);
    }else
    table.editCellAt(0,0);
    jTable1.getActionMap().put("enter", newAction);
    jTable1.setPreferredScrollableViewportSize(jTable1.getPreferredSize());
    }

    Hi,
    I also am using the Bépo layout with an encrypted drive and encountered the same problem: the Return key does not work.
    It seems to work fine if you use the fr-bepo-latin9 keymap.
    # /etc/vconsole.conf
    KEYMAP=fr-bepo-latin9
    But I also looked at the files /usr/share/kbd/keymaps/i386/bepo/fr-bepo.map.gz and /usr/share/kbd/keymaps/i386/bepo/fr-bepo-latin9.map.gz (you can open gzipped files in vim directly). fr-bepo-latin9.map.gz defines keycode 28 (Return) but fr-bepo.map.gz does not.
    I modified fr-bepo.map.gz:
    # vim /usr/share/kbd/keymaps/i386/bepo/fr-bepo.map.gz # Append that line : "keycode 28 = Return".
    # mkinitcpio -p linux # Rebuild the initramfs.
    The Return key now works, but the Backspace (14, "Delete") and Shift (54) keys don’t work. I found that both the cf.map.gz (french canadian layout) and fr-bepo-latin9.map.gz files define those keycodes as well as other non-printing keys so I copied the following lines from fr-bepo-latin9.map.gz to fr-bepo.map.gz:
    keycode 1 = Escape Escape
    keycode 14 = Delete Delete
    keycode 15 = Tab Tab
    keycode 28 = Return
    keycode 29 = Control
    keycode 42 = Shift
    keycode 54 = Shift
    keycode 56 = Alt
    keycode 58 = Caps_Lock
    keycode 97 = Control
    It works! Don’t forget to rebuild the initramfs after you change the keymap file.
    # mkinitcpio -p linux
    I will send a message to the kbd and bépo projects mailing lists and report back.

  • Java JDK not working.

    Hello! I would like to program in Java on my new Arch Linux machine, but it doesn't seem to work. When I use the terminal javac works fine and compiles the file, but when I try running it with java, it does not work. Also, when one class calls another, javac ignores the fact that both files are in the same folder, and just gives errors. Please help!
    Thank you!

    Hm, sorry I have no idea then.
    I just made a minimal test with 3 classes myself but can't reproduce the problem.
    These are the JDK packages I have installed:
    $ yaourt -Qs jdk
    extra/jdk7-openjdk 7.b147_2.1-3
    Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - SDK
    extra/jre7-openjdk 7.b147_2.1-3
    Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs -Full Java runtime
    environment - needed for executing Java GUI and Webstart programs
    extra/jre7-openjdk-headless 7.b147_2.1-3
    Free Java environment based on OpenJDK 7.0 with IcedTea7 replacing binary plugs - Minimal Java
    runtime - needed for executing non GUI Java programs

  • EditCellAt() with mouseclick is not working for first row of the jtable

    Hi All,
    I have extended JTable.changeSelection() & editCellAt() methods to force the text to select when focus is brought to the cell.
    I have a page which has both editable and non-editable columns. when I do a mouse click on FIRST ROW of the editable cell and type the value, The value is not displayed in the cell. when I click on any other editable field in the page, The typed value is displayed in the cell. In the first row of the cell, only the first attempt is not working. When I remove the editCellAt() call in changeSelection(), it works as expected.
    But, If I reach the FIRST ROW editable cell using TAB key instead of Mouse click and type the value, its working fine.
    Kindly suggest me what could be the problem in my code. I think something wrong in editcellat() or mouseclicked/released or focusgained in our versions of JTable or jtextfield.
    Kindly let me know if you need any more functions of my version of implementation.
    Thanks In advance.
    My JTable Version of editCellAt:
         public boolean editCellAt(int row, int column, EventObject e) {
              try {
                   if (getCellEditor() != null && !getCellEditor().stopCellEditing()) {
                        return false;
                   if (!isCellEditable(row, column)) {
                        return false;
                   if (isShowStarRow() /*&& !starRowAdded*/) {
                        VSDataControl ds = getDataSource();
                        if (ds != null) {
                             VSResultSet rs = ds.getResultSet();
                             if (rs != null) {
                                  if (row == rs.getRowCount()) { // This is the star row
                                       // Go to the last record
                                       if (row > 0) {
                                            try {
                                                 rs.getRowAt(row + 1, true);
                                                 rs.last();
                                            } catch (Exception ex) {
                                                 return false;
                                       if (ds.insert() == null) {
                                            return false;
                                       currentRow = row + 1;
                                       starRowAdded = true;
                   TableCellEditor editor = getCellEditor(row, column);
                   if (editor != null && editor.isCellEditable(e)) {
                        editorComp = prepareEditor(editor, row, column);
                        if ( editorComp instanceof VSGridChoice && lastKeyEvent != null ) {
                             VSGridChoice choice = (VSGridChoice) editorComp;
                             choice.handleMissingCharEvent( lastKeyEvent );
                        if (editorComp instanceof VSChoiceBase && lastKeyEvent != null ) {
                             VSChoiceBase hack = (VSChoiceBase)editorComp;
                             hack.addMissingChar(lastKeyEvent);
                        lastKeyEvent = null;
                        if (editorComp == null) {
                             removeEditor();
                             return false;
                        editorComp.setBounds(getCellRect(row, column, false));
                        add(editorComp);
                        editorComp.validate();
                        editorComp.requestFocus();
                        setCellEditor(editor);
                        setEditingRow(row);
                        setEditingColumn(column);
                        editor.addCellEditorListener(this);
                        return true;
                   return false;
              } catch (Exception ex) {
                   showValidationError(e, ex);
                   return false;
         public void changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend)
              super.changeSelection(rowIndex, columnIndex, toggle, extend);
                    editCellAt(rowIndex, columnIndex);
                           if (getEditorComponent() != null)
                   if (getEditorComponent() instanceof CustomJTextField)
                        ((CustomJTextField)getEditorComponent()).selectAll();
          }

    i will suggest you to override your requetFocus()
    like.
    public void requestFocus()
            super.requestFocus(); // may be panel or container.
            textPane.setSelectionStart(0); // textpane is the editor for the cell.
            textPane.setSelectionEnd(textPane.getText().length());
        } Gud luck.

Maybe you are looking for