Help with editing a cell in a JTable. DESPERATE

Hi! Is there someone out there that could help with some source code for editing a cell in my JTable when I run it as an applet??
It works fine when I run it as an application.
I manage to select the row and write a number in it, but I can't get out of the cell (it seems that the program stops??). I want to enter an integer in a cell and when I click enter or with the mouse in an other cell the value that I enter should update some other cell( multiply the entered value with some fixed number and update a cell in a second coloumn)
I am really desperate now..... I have thought about using a MouseListener....
I am using a tablemodel that is from AbstractTableModel.

Are you using some cell editors?
While converting inside them, you might be getting some exceptions (like parseexception)which is stopping you from proceeding further.
Are you using your own tablemodel with custom datatypes?
Hope this helps,
Ramkumar

Similar Messages

  • Help on Editing a Cell in a JTable

    Hi Folks,
    I have a JTable with two Columns and Some number of rows. My Second Column is Editable i.e., I can change the contents of the cell in the same. My Problem is, When I Select the particular cell in Column2 for Editing it starts appending the text I have typed after the text already present in the Selected Cell.Instead I wanted it to overwrite the previous text present in that cell.(Just like the effect we get in MS Excel). Now What I have to do is press F2 and then press CTRL+A to select all the text in the selected Cell and do the editing. This is somewhat a pain in the Ass to do if you have to Edit a huge table. Is there a Solution for the above problem wherein as soon as I select the cell to edit, it should start overwriting on the previous text instead of appending to the same.There are duke dollars in the offing. Anybody interested in helping me out...???
    Thanks in Advance...
    Sachin Shanbhag

    Hi,
    I am using a JTable with cell editor using TableCellEditor.My table consists of two columns of which first one is using JTextField and the second column ( only the for the column of newly added row) using combobox as editors.My requirement is when a cell gets a focus the cell text should be selected automatically (only for the first column which is using JTextField)) with out the user explicitly going to the focused cell and select the text using mouse.
    If anybody can put some idea on this then it would be fine.
    Thanks
    My code is like this.
    public class PurposesTableEditor implements TableCellEditor
              private TableCellEditor editor;
              private TableCellEditor defaultEditor;
              * HashTable variable for storing editors.
              private Hashtable editors;
              * Constructor.
              public PurposesTableEditor()
                   editors = new Hashtable();
                   defaultEditor = new DefaultCellEditor(new JTextField());
              public void add(int row , TableCellEditor editor)
                   editors.put(new Integer(row),editor);
              public Component getTableCellEditorComponent(JTable table,Object value,boolean isSelected,int row,int col)
                   editor = (TableCellEditor)editors.get(new Integer(row));
                   if (editor == null)
                        editor = defaultEditor;
                   return editor.getTableCellEditorComponent(table, value, isSelected, row, col);
              public boolean stopCellEditing()
                   table.getCellRect(table.getSelectedRow(),0,false);
                   table.getCellRect(table.getRowCount()-1, 0, false);
                   return editor.stopCellEditing();
              public void cancelCellEditing()
                   editor.cancelCellEditing();
              public boolean isCellEditable(EventObject anEvent)
                   return true;
              public boolean shouldSelectCell(EventObject anEvent)
                   return editor.shouldSelectCell(anEvent);
              public void addCellEditorListener(CellEditorListener l)
                   editor.addCellEditorListener(l);
              public Object getCellEditorValue()
                   return editor.getCellEditorValue();
              public void removeCellEditorListener(CellEditorListener l)
                   editor.removeCellEditorListener(l);
         }

  • Help with Editing Raw in Lightroom 3.6

    Hello everyone!
    I am new to the forum and also to using lightroom. I just need some help with editing my RAW files. I shoot in RAW + JPEG and I just imported the files to lightroom. It didn't show me the jpeg files for importing so I only imported the RAW files, which I needed. After editing, I realised it said CR2+JPEG. Which means that both files were imported but combied into a single one. Now I basically want to edit my RAW files only. Does that mean I have edited a jpeg or a mixture of both files? How to edit only the RAW file?
    If my picture says CR2+JPEG, does that mean it isnt a pure RAW file and the editing would affect the image quality?
    I will really appreciate some help!

    It imported both, but only shows you the raw file. Ever. What you see and what you edit will only be the raw file. The associated JPG file will follow the raw file around if you move it or rename it using Lightroom, but other than that, Lightroom will ignore it. You could safely delete the JPG, and Lightroom wouldn't complain--probably wouldn't even notice.
    There's a preference you can set that will cause JPGs to be imported as separate images. Then you'd be able to see both of them and edit them separately. That preference won't take effect on images that are already in the catalogue, but will affect all future imports.
    Hal

  • Help with editing a template flash file..

    FIRST OFF..please don't shoot the noobee..I know some folks
    don't like the templates and I appreciate that.
    I have done some reading but not a whole lot about Flash. I
    certainly don't want to BUILD a flash (not yet), but want to edit
    one that is included in a template. I only want to edit the header
    that drops down. It says The Web STudio. I, for example, want it to
    say Marks Studio.
    Ok..the temp comes with Flash/non flash.
    I open w/flash and have a 3 folders: flash, psd and html.
    -flash folder has Images, fla doc and one flash html file
    -PSD folder has 3 psd files
    -html folder has flash folder, images folder, css file and
    one single index.html file.
    I opened the flash folder and found the image.jpg I wanted to
    change to Marks studio.
    I opend the PSD and found the slice that is the same as that,
    then edited it like I want it in PSD, then saved to replace the old
    image. top1. jpg
    Still, it is the same ole one that came with the temp.
    as I said, please don't shoot the noobe. I just wanna edit
    the flash file.
    Thanks for any help.
    Mark

    You'd need Flash to edit the FLA file.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "snipingkid" <[email protected]> wrote in
    message
    news:enev5r$p8l$[email protected]..
    > Hey guys,
    >
    > I need some help with editing a flash template, I have
    the .swf, .fla, and
    > .html file of this thing, I would like however to edit
    something on it....
    > Ive
    > tried everything, I have access to photoshop and
    dreamweaver 8... Im not
    > any
    > good at it but with decent help I could get something
    done. What I would
    > like
    > to edit is just text that flies in.... I would like to
    edit the text, how
    > do I
    > do it.... Thanksj
    >

  • Help with Editable Regions

    We are in the process of creating a template for our site. We
    are working on the editable regions. What we are finding is if we
    want to add a bulleted list of items (let's say links) we can't do
    it without the list header also becoming bulleted. For instance
    let's say we have the following:
    Medical Resource Links
    Cardiology
    GI
    Respiratory
    We would want Medical Resource Links to be bold and stay to
    the left. The other three items we would want to have bullets.
    When we try this in an editable region all four items move
    over and only the first gets the bullet. Do we need an additional
    editable region for the title? Is this controlled via a CSS? Any
    help you can give would be greatly appreciated. We are beginners
    with this. Thanks.

    This has nothing to do with editable regions. It's all about
    the HTML on
    the page.
    Show us the HTML for your list, and I'll tell you why it's
    happening the way
    you describe.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "DONNA6985" <[email protected]> wrote in
    message
    news:edme63$o0m$[email protected]..
    > We are in the process of creating a template for our
    site. We are working
    > on
    > the editable regions. What we are finding is if we want
    to add a bulleted
    > list
    > of items (let's say links) we can't do it without the
    list header also
    > becoming
    > bulleted. For instance let's say we have the following:
    >
    > Medical Resource Links
    > Cardiology
    > GI
    > Respiratory
    >
    > We would want Medical Resource Links to be bold and stay
    to the left. The
    > other three items we would want to have bullets.
    > When we try this in an editable region all four items
    move over and only
    > the
    > first gets the bullet. Do we need an additional editable
    region for the
    > title?
    > Is this controlled via a CSS? Any help you can give
    would be greatly
    > appreciated. We are beginners with this. Thanks.
    >

  • Need help with editing flash

    Hello everyone, I'm really new to flash and I have some problems with editing my flash file. Currently, I have a small flash application  in a folder, containing various kinds of files such as AS, SWF, FLA, HTML. What I want to do is to change the text inside one of the buttons in the application. After doing some reasearching, I realized that I should probably make some changes to the FLA file(Quiz.fla for example) since Quiz.fla is the only FLA file in the folder. Therefore, I opened it using Adobe Flash CS5.5, what what I found out is that the Quiz.fla file  is really different from other FLA files. It only shows a plain background when I open it, without showing the actual interface of the flash application. It does contain all the buttons and contants under the Library section on the right side of Adobe Flash . When I try to change the text inside the button then save-publish, the newly published SWF file  would just be a static picture of the button I've changed and everything else is gone. Any help is greatly appreciated!

    ya, that's why I'm confused. I've actually tried editing some sample flash FLA files and all I need to do is to edit them in the Library and it would work out. But this one seems to have some weird problems. I could actually send the application folder to you if you have some time to take a look at it. Thank you very much again for the help!

  • Help with JTreeTable custom cell renderer!

    Hi.
    I've followed diligently the complete TreeTable2 example found on the Sun site. http://java.sun.com/products/jfc/tsc/articles/treetable2/
    What I'm trying to do is to add alternate-row shading on the Column(0) of the JTreeTable where the Column class is "TreeTableModel".
    so, from the example, I've added the following setCellRenderer declaration to TreeTableExample2.java:
         protected JTreeTable createTreeTable() {
              JTreeTable       treeTable = new JTreeTable(model);
              treeTable.getColumnModel().getColumn(1).setCellRenderer
              (new IndicatorRenderer());
              treeTable.getColumnModel().getColumn(0).setCellRenderer
              (new MyTableCellRenderer());Then, I subclass DefaultTableCellRenderer as shown below, in a new class called "MyTableCellRenderer"
    import java.awt.Color;
    import java.awt.Component;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableCellRenderer;
    import javax.swing.table.TableCellRenderer;
    public class MyTableCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer
         private static final long serialVersionUID = 1L;
         public MyTableCellRenderer() {
         public Component getTableCellRendererComponent(JTable jtable, Object obj, boolean isSelected, boolean hasFocus, int i, int j)
              if (i % 2 == 0 && !isSelected) {
                   this.setBackground(new Color(214,226,255));
                   this.setForeground(Color.BLACK);
              } else if (isSelected)
                   this.setBackground(new Color(204, 204, 255));
              else {
                   this.setBackground(Color.white);
              //if (obj != null)
              this.setValue(obj.toString());
              System.out.println("obj: " + obj.toString());
              System.out.println("obj type: " + obj.getClass().getName());
              return ((Component) (this));
    }I've been pulling out whatever few hairs I have left in my sparse scalp to get this working, but it's looking grim thus far.
    Here are links to screenshots of my progress, or lack thereof:
    Original Working TreeTable II
    http://www.pharmalytix.com/original_treetable.jpg
    My Not-working Tree Table II w/ Custom Cell Renderer
    http://www.pharmalytix.com/customtablecellrenderer_treetable.jpg
    thanks again - !!

    phew! finally got this sucker working. I had to retrieve the default rendererer of my TreeTable's TreeTableModel class column, which is the JTree and then, in its component-form, start mucking about with its stylings. The real black-hole of progress was caused by my brain imploding from not being able to understand that a "Component" was what represented the "thing" whose behaviour I wanted to alter, be it a Jtree node or Jtable cell.
              treeTable.getColumnModel().getColumn(0).setCellRenderer(new TableCellRenderer() {
                   public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int col) {
                        Component comp = treeTable.getDefaultRenderer(TreeTableModel.class).getTableCellRendererComponent(table, value, isSelected, hasFocus, row, col);
                        if (row % 2 == 0 && !isSelected) {
                             comp.setBackground(new Color(214,226,255));
                             comp.setForeground(Color.BLACK);
                        } else
                             if (isSelected)
                                  comp.setBackground(new Color(204, 204, 255));
                             else {
                                  comp.setBackground(Color.white);
                        return comp;
              });In all of its ravishing glory:
    http://www.pharmalytix.com/alternateshading_treetable.jpg
    Edited by: DataHog on Nov 6, 2007 10:21 AM

  • Help with "edit in" most items grayed out

    I am not able to use anything but Edit in Photoshop and open as a smart object under "photo" in the drop down dialog. Please help me so that I am able to edit in Camera Raw, merge to Panorama, HDR, another application and open as layers from Lightroom.
    I currently have Lightroom 2.0, Camera Raw 4.5 and I just installed the upgrade patch of Photoshop CS3 so I am using 10.01. I thought that maybe this patch would work....but to no avail. I am using XP Pro for Windows. I re-loaded my entire system and decided to only install 2.0.... rather then 1.4 and then 2.0 as I was having problems with Lightroom this way as well. Thanks so much I really appreciate any assistance with this issue.
    Ruth

    Thanks so much. Actually that is a good point about selecting multiple photos. I had not done that as I didn't think that the program was working so I was editing through Bridge. Also Ian I will try the upgrade and see if that fixes the problem. I use Camera Raw all the time so I was really discouraged when it didn't show up after the CS3 patch. I will keep you posted as to whether your suggestions worked or not....thanks for your quick replies Rob and Ian!!!

  • Newbie help with editing files in DW CS3

    I am new to using Dreamweaver, and I am having trouble with
    trying to edit existing files using DW CS3. When I open an existing
    file on my local site, DW converts some of the code using &.
    This is a problem because I need to edit the file just as it was
    originally written, so I can save it after editing and upload to my
    website.
    In my Preferences, I have Code Rewriting set to:
    -Rewrite Code: Fix invalidly nexted and unclosed tags
    [Unchecked]
    -Rewrite Code: Rename form items when posting [Checked]
    -Rewrite Code: Remove extra closing tags [Unchecked]
    -Never rewrite code: In files with extensions .as .asr .asc
    .asp .ascx .asmx .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp
    .php .php3 .vb .xml .xsl .xslt .xul
    -Special characters: Encode <, >, &, and " in
    attribute values using & [Unchecked]
    -URL encoding: Do not encode special characters
    -Active Content: Insert using browser-safe scripts [Checked
    by default]
    -Active Content: Convert tags to scripts on file open
    [Unchecked]
    Today, I opened a file with an .xml extension, and DW rewrote
    the special characters > and '. Since I have in my preferences
    to Never rewrite code in .xml, I don't understand why DW is
    rewriting the code. Also, in my preferences I have unchecked the
    Special Characters, so why is DW still rewriting the code?
    Do I have some of the Code Rewriting preferences set wrong?
    Is there another place I need to tell DW not to rewrite
    existing code?
    Thanks for your help!
    Cyndi

    It imported both, but only shows you the raw file. Ever. What you see and what you edit will only be the raw file. The associated JPG file will follow the raw file around if you move it or rename it using Lightroom, but other than that, Lightroom will ignore it. You could safely delete the JPG, and Lightroom wouldn't complain--probably wouldn't even notice.
    There's a preference you can set that will cause JPGs to be imported as separate images. Then you'd be able to see both of them and edit them separately. That preference won't take effect on images that are already in the catalogue, but will affect all future imports.
    Hal

  • PSE 8 - Help with Editing Group Layers

    I am working with some templates right now that are apparently set up in Grouped layers.  I've looked into it, and the best result I can find is that I hav eto "simplify" the group in order to be able to edit the layers.  That doesn't seem to allow me to edit the layers individually, though. 
    If layers are "grouped," does that mean I can't edit the layers?  Please Help!
    Thank you!

    Here is an action someone made just for that.
    http://www.elementsvillage.com/forums/showthread.php?t=48026&highlight=layer+groups
    This action opens the layer groups by deleting the layer group (set) while leaving
    the layers inside.
    So the layers will no longer be in layer groups (sets), but at least you will be able to see
    what's inside the layer groups and edit those layers.
    MTSTUNER   

  • Need some help with a timer that draws my JTable.

    Assumre I have the following code:
    * Created on Feb 25, 2004
    * To change the template for this generated file go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    * @author PaulB
    * To change the template for this generated type comment go to
    * Window>Preferences>Java>Code Generation>Code and Comments
    import java.util.Vector;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class blah extends JApplet implements ActionListener {
         private JTable m_Table;
         private Timer m_Timer  = new Timer(500, this);
         private int x = 0;
         public void actionPerformed(ActionEvent e) {
              this.m_Timer.stop();
              this.x++;
              if (x == 10) {
                   this.setTable();
              } else {
                   this.m_Timer.start();
         public void init() {
              this.m_Timer.start();
         private void setTable() {
              Vector vData               = new Vector();
              Vector vFields               = new Vector();
              // Set our layout.
              getContentPane().setLayout(new GridLayout(1,0));
              // Set our table fields.
              for (int i = 0; i < 5; i++) {
                   vFields.addElement("test");
              // Set our default table values.
              for (int i = 0; i < 5 ; i++) {
                   Vector vSubData     = new Vector();
                   vSubData.addElement(null);
                   for (int j = 0; j <= vFields.size(); j++) {
                        vSubData.addElement(null);
                   vData.addElement(vSubData);
              // Create a JTable that disallow edits.
              this.m_Table = new JTable(vData, vFields) {
                   public boolean isCellEditable(int rowIndex, int vColIndex){
                        return false;
              // Disable column reording.
              this.m_Table.getTableHeader().setReorderingAllowed(false);
              // Create the scroll pane and add the table to it.
              JScrollPane scrollPane = new JScrollPane(this.m_Table);
              // Add scroll pane to the applet.
              getContentPane().add(scrollPane);
    }I use a timer to draw my JTable, and it works properly, but I physically have to re-size my Applet frame for the JTable to be displayed... could somebody help me out?
    Thanks inadvance

    Just add a validate and repaint after settable, see changes made by V.V. shown below:
    /* <applet code="blah" width=300 height=300></applet> */
    import java.util.Vector;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class blah extends JApplet implements ActionListener {
       private JTable m_Table;
       private Timer m_Timer = new Timer(500, this);
       private int x = 0;
       public void actionPerformed(ActionEvent e)  {
          m_Timer.stop();
          x++;
          if (x == 10)  {
             setTable();
             validate();          // added by V.V.
             repaint();          // added by V.V.
          } else {
             m_Timer.start();
       public void init()  {
          this.m_Timer.start();
       private void setTable()  {
          Vector vData = new Vector();
          Vector vFields = new Vector();   
          // Set our layout.
          getContentPane().setLayout(new GridLayout(1,0));   
          // Set our table fields.
          for (int i = 0;i < 5;i++) {
             vFields.addElement("test");
          // Set our default table values.
          for (int i = 0;i < 5;i++) {
             Vector vSubData = new Vector();
             vSubData.addElement(null);
             for (int j = 0;j <= vFields.size();j++) {
                vSubData.addElement(null);
             vData.addElement(vSubData);
          // Create a JTable that disallow edits.
          this.m_Table = new JTable(vData, vFields)  {
             public boolean isCellEditable(int rowIndex, int vColIndex) {
                return false;
          // Disable column reording.
          this.m_Table.getTableHeader().setReorderingAllowed(false);   
          // Create the scroll pane and add the table to it.
          JScrollPane scrollPane = new JScrollPane(this.m_Table);   
          // Add scroll pane to the applet.
          getContentPane().add(scrollPane);
    };o)
    V.V.
    PS: If this helped, don't forget to award the dukes!

  • Help with editing audio files (please)

    hi there,
    firstly sorry for posting in this section but i had no idea where else to do it.
    i recently went to an acoustic gig and recorded some songs from it using a sony ericsson phone. i have blue-toothed the files to my mac. there are a few songs on each recording are two things i would like to do with these files.
    1. i would like to split the files so they are separate for each song.
    2. i would like to try remove as much background noise as possible i.e. crowd making noise, or at least focus it on the actual music being played.
    i have download audacity but have no idea. i am looking for a possibly free way to do this and simple too. i am not going to go hardcore with the editing, just want to do it quick and easy.
    any help much appreciated, thanks, ravi.
    Message was edited by: irav_86

    You need to import your song to iTunes first.
    Than open Garage Band and click on bottom Right button (View/ Hide media browser).
    Click on Audio>iTunes>Music, and choose the song you want to edit. Then Just drag to your board and this will open new track, you will see line running vertically on your screen, this is showing you at what measure your song will start, just move to the beginning of a track (if you drop it too soon, just "pick" it up again and move it). This is very useful when you are trying to merge several track (e.g. for your iMovie, as you have only two tracks on it).
    Than Split and delete portion you don't want any more.
    To Slit a track, adjust your measure where you want to split it and go to Edit>Spit.
    Hope this helps.

  • Need Help With Shifting Table Cells

    Hi --
    I was asked to take a look at this page and fix the cell that have shifted down:  http://www.moore-engineers.com/contact/contact.html.  It's been quite a while since I've really worked with tables, and I'm having a hard time figuring this out.
    Can someone take a look and let me know what's going on?  I'd appreciate any help.
    Thanks,
    John

    Hi Osgood --
    Thanks for taking a look.  You're comments validated what I thought.  And you're right...that's not my work.  If you ever see me produce work like this, please have Adobe revoke my DW license!
    I spend about an hour with it yesterday and no matter what I did, either the problem went uncorrected or the entire table was blown apart.  I eventually gave up.
    I think my client suspects he's been "stitched-up" by the person who built the site which is why he contacted me.  I've recommended that the site be totally rewritten.
    Thanks again for your comments.
    John

  • How? double click to edit a cell in a JTable (Custom Editor/TableModel)

    I have a JTable with a custom table model that when you click anything in the first column a custom editor appears. I would like to know how to make the custom editor appear after a double click on any cell in the first column. It can probably be done with a MouseListener but is there any easier way to do this?
    Thanks.

    this works for me.
    public class MyJcustomEditor extends DefaultCellEditor {
    public MyJcustomEditor(JTextField tField) {
    super(tField);
    setClickCountToStart(2);
    }

  • Need help with inserting rows in ResultSet and JTable

    hello Guru!
    i have inserted a row in my result set and i want that my table shows this row promptly after i have inserted it in my result set...
    but when i use following code for my resultset:
    rs.moveToInsertRow();
    rs.updateInt(1,nr);
    rs.updateString(2, name);
    rs.insertRow();
    Record are inserted in resultset and database but not shown in my JTable??
    Anyone a Clue to without reexecuting the query how can i display inserted row in JTable
    http://download-west.oracle.com/docs/cd/A87860_01/doc/java.817/a83724/resltse7.h
    I have refrered the following links but still clue less help Guruuuuuuu
    i m really in trobble??????

    i am just near by the Solution using the Database Metadata
    by couldn't get the ideaaaa
    ==================================================
    http://download-west.oracle.com/docs/cd/A87860_01/doc/java.817/a83724/resltse7.htm
    Seeing Database Changes Made Internally and Externally
    This section discusses the ability of a result set to see the following:
    its own changes (DELETE, UPDATE, or INSERT operations within the result set), referred to as internal changes
    changes made from elsewhere (either from your own transaction outside the result set, or from other committed transactions), referred to as external changes
    Near the end of the section is a summary table.
    Note:
    External changes are referred to as "other's changes" in the Sun Microsystems JDBC 2.0 specification.
    Seeing Internal Changes
    The ability of an updatable result set to see its own changes depends on both the result set type and the kind of change (UPDATE, DELETE, or INSERT). This is discussed at various points throughout the "Updating Result Sets" section beginning on , and is summarized as follows:
    Internal DELETE operations are visible for scrollable result sets (scroll-sensitive or scroll-insensitive), but are not visible for forward-only result sets.
    After you delete a row in a scrollable result set, the preceding row becomes the new current row, and subsequent row numbers are updated accordingly.
    Internal UPDATE operations are always visible, regardless of the result set type (forward-only, scroll-sensitive, or scroll-insensitive).
    Internal INSERT operations are never visible, regardless of the result set type (neither forward-only, scroll-sensitive, nor scroll-insensitive).
    An internal change being "visible" essentially means that a subsequent getXXX() call will see the data changed by a preceding updateXXX() call on the same data item.
    JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
    boolean ownDeletesAreVisible(int) throws SQLException
    boolean ownUpdatesAreVisible(int) throws SQLException
    boolean ownInsertsAreVisible(int) throws SQLException
    Note:
    When you make an internal change that causes a trigger to execute, the trigger changes are effectively external changes. However, if the trigger affects data in the row you are updating, you will see those changes for any scrollable/updatable result set, because an implicit row refetch occurs after the update.
    Seeing External Changes
    Only a scroll-sensitive result set can see external changes to the underlying database, and it can only see the changes from external UPDATE operations. Changes from external DELETE or INSERT operations are never visible.
    Note:
    Any discussion of seeing changes from outside the enclosing transaction presumes the transaction itself has an isolation level setting that allows the changes to be visible.
    For implementation details of scroll-sensitive result sets, including exactly how and how soon external updates become visible, see "Oracle Implementation of Scroll-Sensitive Result Sets".
    JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
    boolean othersDeletesAreVisible(int) throws SQLException
    boolean othersUpdatesAreVisible(int) throws SQLException
    boolean othersInsertsAreVisible(int) throws SQLException
    Note:
    Explicit use of the refreshRow() method, described in "Refetching Rows", is distinct from this discussion of visibility. For example, even though external updates are "invisible" to a scroll-insensitive result set, you can explicitly refetch rows in a scroll-insensitive/updatable result set and retrieve external changes that have been made. "Visibility" refers only to the fact that the scroll-insensitive/updatable result set would not see such changes automatically and implicitly.
    Visibility versus Detection of External Changes
    Regarding changes made to the underlying database by external sources, there are two similar but distinct concepts with respect to visibility of the changes from your local result set:
    visibility of changes
    detection of changes
    A change being "visible" means that when you look at a row in the result set, you can see new data values from changes made by external sources to the corresponding row in the database.
    A change being "detected", however, means that the result set is aware that this is a new value since the result set was first populated.
    With Oracle8i release 8.1.6 and higher, even when an Oracle result set sees new data (as with an external UPDATE in a scroll-sensitive result set), it has no awareness that this data has changed since the result set was populated. Such changes are not "detected".
    JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
    boolean deletesAreDetected(int) throws SQLException
    boolean updatesAreDetected(int) throws SQLException
    boolean insertsAreDetected(int) throws SQLException
    It follows, then, that result set methods specified by JDBC 2.0 to detect changes--rowDeleted(), rowUpdated(), and rowInserted()--will always return false with the 8.1.6 Oracle JDBC drivers. There is no use in calling them.
    Summary of Visibility of Internal and External Changes
    Table 12-1 summarizes the discussion in the preceding sections regarding whether a result set object in the Oracle JDBC implementation can see changes made internally through the result set itself, and changes made externally to the underlying database from elsewhere in your transaction or from other committed transactions.
    Table 12-1 Visibility of Internal and External Changes for Oracle JDBC
    Result Set Type Can See Internal DELETE? Can See Internal UPDATE? Can See Internal INSERT? Can See External DELETE? Can See External UPDATE? Can See External INSERT?
    forward-only
    no
    yes
    no
    no
    no
    no
    scroll-sensitive
    yes
    yes
    no
    no
    yes
    no
    scroll-insensitive
    yes
    yes
    no
    no
    no
    no
    For implementation details of scroll-sensitive result sets, including exactly how and how soon external updates become visible, see "Oracle Implementation of Scroll-Sensitive Result Sets".
    Notes:
    Remember that explicit use of the refreshRow() method, described in "Refetching Rows", is distinct from the concept of "visibility" of external changes. This is discussed in "Seeing External Changes".
    Remember that even when external changes are "visible", as with UPDATE operations underlying a scroll-sensitive result set, they are not "detected". The result set rowDeleted(), rowUpdated(), and rowInserted() methods always return false. This is further discussed in "Visibility versus Detection of External Changes".
    Oracle Implementation of Scroll-Sensitive Result Sets
    The Oracle implementation of scroll-sensitive result sets involves the concept of a window, with a window size that is based on the fetch size. The window size affects how often rows are updated in the result set.
    Once you establish a current row by moving to a specified row (as described in "Positioning in a Scrollable Result Set"), the window consists of the N rows in the result set starting with that row, where N is the fetch size being used by the result set (see "Fetch Size"). Note that there is no current row, and therefore no window, when a result set is first created. The default position is before the first row, which is not a valid current row.
    As you move from row to row, the window remains unchanged as long as the current row stays within that window. However, once you move to a new current row outside the window, you redefine the window to be the N rows starting with the new current row.
    Whenever the window is redefined, the N rows in the database corresponding to the rows in the new window are automatically refetched through an implicit call to the refreshRow() method (described in "Refetching Rows"), thereby updating the data throughout the new window.
    So external updates are not instantaneously visible in a scroll-sensitive result set; they are only visible after the automatic refetches just described.
    For a sample application that demonstrates the functionality of a scroll-sensitive result set, see "Scroll-Sensitive Result Set--ResultSet5.java".
    Note:
    Because this kind of refetching is not a highly efficient or optimized methodology, there are significant performance concerns. Consider carefully before using scroll-sensitive result sets as currently implemented. There is also a significant tradeoff between sensitivity and performance. The most sensitive result set is one with a fetch size of 1, which would result in the new current row being refetched every time you move between rows. However, this would have a significant impact on the performance of your application.
    how can i implement this using
    JDBC 2.0 DatabaseMetaData objects include the following methods to verify this. Each takes a result set type as input (ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_SENSITIVE, or ResultSet.TYPE_SCROLL_INSENSITIVE).
    boolean deletesAreDetected(int) throws SQLException
    boolean updatesAreDetected(int) throws SQLException
    boolean insertsAreDetected(int) throws SQLException

Maybe you are looking for