Swing table & database

i have a swing table which i intend to invoke it from my jsp page; however, the data modification
will be carefully monitorered and should be recorded into the database. i.e.,
the table has emp_id, fname, lname and phone; if anything changes in the table, how could i catch
it and write a dynamic sql statement update(or insert) into the database? say, i was hoping that
there will be a "Submit" button on the swing table which could allow user press the button and then
send the last modified record and commit the transaction.
Thx.

Based on JSP forum, I got response from one of the replier that I shouldn't use JSP to handle any
swing table??? He told me JSP is not meant for this purpose and I should not combine this two?
if what you said is true, how could I catch the modification in a JSP page as I may (POST/GET)
later on press the submit button to commit the change into database? Could I treat this swing as
a Servlet? Tkx.

Similar Messages

  • How to make the diagonal line in the swing table cell?

    Hi all,
    How to make the diagonal line in the swing table cell just like the link below?
    http://61.132.17.188/webber/table.gif

    One improvement.. To get a line that is neat, use a bit of Graphics2D
        public void paintComponent(java.awt.Graphics g)
            int w = getSize().width;
            int h = getSize().height;
            // draw a line between (0,0) and (w,h)  
            g.setColor(getForeground());
            if (strTop == null)
                strTop = "  ";
            if (strBottom == null)
                strBottom = "  ";
                java.awt.Graphics2D g2 = (java.awt.Graphics2D)g;
              g2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
              //g2.setStroke(new java.awt.BasicStroke(14.0f));
            g.drawLine(0, 0, w, h);
            //the following lines will draw the two strings,
            //one above the top of the line and the above below it.     
            g2.drawString(strTop, (w/2)+2, (h/2)-2);
            g2.drawString(strBottom, 2, (h / 2) + 2);
            //the x,y for drawString are only based on assumption.   //do necessary changes to suit ur needs.
        }Then create a TableCellRenderer and set it to the Table Header for ur table's 1st row.....
    Cheers

  • Problem: Printing Swing Tables

    I am creating an application that is displaying data using Swing tables. It is a requirement that I am able to print these tables to a printer, as well as displaying to screen. Can anyone help me?!

    There's a basic getPrintable() method in JTable which, if all you want is the table with a page header and or footer, pretty much does the job for you.
    There are also various print methods which attempt to automate the job even more.
    These are useful only if the table is all you want to print, but they might get the job done for you.

  • Swing Tables

    Hi ,
    I have two Swing Tables. I selected a row in one table. Now i want to select the same index row of another table.Please tell me how to do.It's urgent.

    Could you please give some brief notes to implementIts one line of code that has already been given to you. There is nothing to implement. At least if I understand the question there is nothing to implement.
    If you don't like the 1 line of code suggestion, then feel free to implement your own ListSelectionListener. You can read the Swing tutorial on [How to Write a List Selection Listener|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html]
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the [Code Formatting Tags|http://forum.java.sun.com/help.jspa?sec=formatting], so the posted code retains its original formatting.

  • Swing and database

    Hello everyone!
    Starting in programming, someone could tell me a tutorial that allows you to retrieve data from a database in a JTable?
    Thanks in advance

    Unlike VB, Java Swing presentation classes do not provide database access. What you need to do is build a model for your JTable that calls JDBC code to fetch the data.
    You should read the tutotial at
    http://java.sun.com/docs/books/tutorial/uiswing/components/table.html

  • BC4J temp tables & database role

    There are two essential BC4J temp tables (PCOLL_CONTROL, PS_TXN), along with others: http://www.oracle.com/technetwork/developer-tools/jdev/overview/bc4j-temp-tables-087270.html
    We have 'sysadmin' role associated in our Development DB, the passivation store table PS_TXN is populated as expected.
    However, in our production DB, we ONLY manually created the two above tables granted with Insert/Delete/Update/Select permissions (DBA will NOT agree to assign 'sysadmin' role), PS_TXN is not populated at all, which results in some session management issue in our application.
    So the question is: What is the proper database role to associate with for the temp tables to work properly (in our case, we use SQL server data source).
    Thank you,

    Mike, you need at least to add a sequence (PS_TXN_SEQ if I remember right) do you need to add a grant to create a sequence.
    Timo

  • Two swing tables row doesn't have same height-urgent

    Hi,
    i have two tables inside two different panels.The tables row size is not same.private javax.swing.JPanel getJPanel3() {
         if (ivjJPanel3 == null) {
              try {
                        ivjJPanel3 = new javax.swing.JPanel();
                        ivjJPanel3.setName("JPanel3");
                        ivjJPanel3.setBorder(new javax.swing.border.EtchedBorder());
                        ivjJPanel3.setLayout(new java.awt.BorderLayout());
                        ivjJPanel3.setBackground(new java.awt.Color(220,222,248));
                        ivjJPanel3.setBounds(580, 24, 215, 319);
                        ivjJPanel4 = new javax.swing.JPanel( new BorderLayout());
                        ivjJPanel4.setBackground(new java.awt.Color(220,222,248));
                        ivjJLabel13 = new JLabel("Enter Attendees", JLabel.CENTER);
                        ivjJPanel4.add( ivjJLabel13, BorderLayout.NORTH );
                        ivjJPanel5 = new javax.swing.JPanel( new BorderLayout());
                        ivjJPanel5.setBackground(new java.awt.Color(220,222,248));
                        ivjJLabel14 = new JLabel("First Name");
                        ivjJPanel5.add( ivjJLabel14, BorderLayout.WEST );
                        ivjJTextField17 = new javax.swing.JTextField();
                        ivjJPanel5.add( ivjJTextField17, BorderLayout.CENTER );
                        ivjJPanel4.add(ivjJPanel5, BorderLayout.CENTER);
                        ivjJPanel6 = new javax.swing.JPanel( new BorderLayout());
                        ivjJPanel6.setBackground(new java.awt.Color(220,222,248));
                        ivjJLabel15 = new JLabel("Last Name");
                        ivjJPanel6.add( ivjJLabel15, BorderLayout.WEST );
                        ivjJTextField18 = new javax.swing.JTextField();
                        ivjJPanel6.add( ivjJTextField18, BorderLayout.CENTER );
                        ivjJPanel4.add(ivjJPanel6, BorderLayout.SOUTH);
                        getJPanel3().add( ivjJPanel4, BorderLayout.NORTH );
                        String[] columnNames = {"First Name", "Last Name"};
                        tableModel = new DefaultTableModel( columnNames, 0 ){
                             public boolean isCellEditable(int row, int column)
                                 return false;
                        ivjJTable = new JTable( tableModel );
                        ivjJTable.setRowSelectionAllowed(true);
                        ivjJTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
                        ivjJScrollPane = new JScrollPane( ivjJTable );
                        getJPanel3().add( ivjJScrollPane, BorderLayout.CENTER );
                        ivjJPanel7 = new javax.swing.JPanel();
                        ivjJPanel7.setLayout( new java.awt.BorderLayout());
                        ivjJButton4 = getJButton4();
                        ivjJPanel7.add( ivjJButton4, BorderLayout.WEST);
                        ivjJButton5 = getJButton5();
                        ivjJPanel7.add( ivjJButton5, BorderLayout.EAST );
                        getJPanel3().add(ivjJPanel7, BorderLayout.SOUTH );
                   } catch (java.lang.Throwable ivjExc) {
                   // user code begin {2}
                   // user code end
                   handleException(ivjExc);
              return ivjJPanel3;
    * Return the JPanel3 property value.
    * @return javax.swing.JPanel
    /* WARNING: THIS METHOD WILL BE REGENERATED. */
    private javax.swing.JPanel getJPanel43() {
         if (ivjJPanel43 == null) {
              try {
                                    ivjJPanel43 = new javax.swing.JPanel();
                                    ivjJPanel43.setName("JPanel4");
                        ivjJPanel43.setBorder(new javax.swing.border.EtchedBorder());
                        ivjJPanel43.setLayout(new java.awt.BorderLayout());
                        ivjJPanel43.setBackground(new java.awt.Color(220,215,222,248));
                        ivjJPanel43.setBounds(796, 24, 260,296);
                        ivjJPanel4t = new javax.swing.JPanel( new BorderLayout());
         ivjJPanel4t.setBackground(new java.awt.Color(220,222,248));
                                            ivjJLabel13t = new JLabel("Enter Firm", JLabel.CENTER);
                                            ivjJPanel4t.add( ivjJLabel13t, BorderLayout.NORTH );
                                            ivjJPanel5t = new javax.swing.JPanel( new BorderLayout());
                                            ivjJPanel5t.setBackground(new java.awt.Color(220,222,248));
                                            ivjJLabel14t = new JLabel("Firm  ");
                                            ivjJPanel5t.add( ivjJLabel14t, BorderLayout.WEST );
                                            // ivjJTextField17t = new javax.swing.JTextField();
                                            ivjJPanel5t.add( getJComboBox30(), BorderLayout.CENTER );
                                            ivjJPanel4t.add(ivjJPanel5t, BorderLayout.CENTER);
                                            ivjJPanel6t = new javax.swing.JPanel( new BorderLayout());
                                            ivjJPanel6t.setBackground(new java.awt.Color(220,222,248));
                                            ivjJLabel15t = new JLabel("         ");
                                            ivjJPanel6t.add( ivjJLabel15t, BorderLayout.WEST );
                                            ivjJTextField30 = new javax.swing.JTextField();
                                            ivjJPanel6t.add( ivjJTextField30, BorderLayout.CENTER );
                                            ivjJPanel4t.add(ivjJPanel6t, BorderLayout.SOUTH);
                                            getJPanel43().add( ivjJPanel4t, BorderLayout.NORTH );
                                    String[] columnNames1 = {"Firm Name"};
                        tableModel1 = new DefaultTableModel( columnNames1, 0 ){
                             public boolean isCellEditable(int row, int column)
                                 return false;
                        ivjJTable1 = new JTable( tableModel1 );
                        ivjJTable1.setRowSelectionAllowed(true);
                                    ivjJTable1.setSelectionModel(ivjJTable.getSelectionModel());
                                    ivjJTable1.changeSelection(ivjJTable.getSelectedRow(),0,false,false);
                        ivjJScrollPane1 = new JScrollPane( ivjJTable1 );
                        ivjJPanel43.add( ivjJScrollPane1, BorderLayout.CENTER);
                                    setVisible(true);
               catch (java.lang.Throwable ivjExc) {
                   // user code begin {2}
                   // user code end
                   handleException(ivjExc);
              return ivjJPanel43;
    }

    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.

  • FROM table @ database

    In a SQL statement how can you substitute the database name for a column in a query ?

    select * from table@databaselink
    one time:
    create public synonym syn_table for table@databaselink;
    the this statement delivers the same result:
    select * from syn_table;

  • Hi change of selections in swings table rows..

    hi,
    i have created table using swings..jtable..
    it contains 3 colums and 16 rows..in first column a field called property..
    i have taken Table column in first column and inserted a combo box which contains 15 values..
    when user clicks on first columns rows it shows that combo box for selection..then user can select a value from that..now i want if user select value from combo box then in second column it should show the corresponding values for selection..
    like in first row.. second row..
    empno---null,not null,like
    empname---like,eqaul,
    empdate --less than,greaet than etcc..
    this is what i want..
    if he selects avalue from combo box of first columns it should show corresponding values in second column's row..
    it should show for all 16 rows..
    in second coumn also same as table column and combo box with that values(null,not null etc)
    my question will be bit confusing..
    give me solutions with sample code for above req..
    regards,
    sam

    the approach is similar to that used in "filtering" the table contents.
    sub the tablemodel and use two vectors to manage the reflected data...
    Vector a = inital data in unchanged state.
    Vector b = table data which can be set using the current row selection and the data in vector a. (data store)
    Thus the flow would be:
    i)process selection event.
    ii)apply selection rule against Vector a
    iii)set/change data in Vector b using data from Vector a
    firetableDataChanged()this triggers a refresh of displayed data.
    not strictly necessary to use Vectors but helpful if you need ti Iterate...
    :)

  • Adding a field/column in sql table/database and adding the same field /column in biztalk schema

    I have a biztalk application that has a source schema and destination schema inside a map.
    A new field/column in the sql database has been created. Now I have to add this field/record to my source schema.
    My question is, do I manually add this field/record to my source schema and update my source map or do I have to generate a new schema using add generated items>consume adapter service>sql and update my source map ?

    You would need to add the fields to the message schema your SQL data is mapped onto.
    Also update the SQL statement which is executed inside your sql adapter settings to return the new columns.
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • How i can create tables(database) in ms-access using jsp

    i want to create tables by using jsp in ms-access .user can only enter
    table name ,how many table fields ,constraints etc

    You'll get better luck if you post this JDeveloper/ADF/JSF question to the JDeveloper forum.
    -steve-

  • Swing table and JScrollPane

    I am using JTable with JScrollPane. JScrollPane is set with the scroll bar policy set to AS-NEEDED. But still when my table columns go beyond the table or View Port Horizontal Scroll bar of the ScrollPane does not appear.
    I also tried the ALWAYS policy for Scroll Pane . But still horizontal pane remains disabled.
    Pls suggest some solution.

    Set the autoresize mode of the table to off.
    setAutoResizeMode (JTable.AUTO_RESIZE_OFF)
    Ranjit.
    I am using JTable with JScrollPane. JScrollPane is set
    with the scroll bar policy set to AS-NEEDED. But still
    when my table columns go beyond the table or View Port
    Horizontal Scroll bar of the ScrollPane does not
    appear.
    I also tried the ALWAYS policy for Scroll Pane . But
    still horizontal pane remains disabled.
    Pls suggest some solution.

  • SWING Table Headers

    Hi
    I've created a table which is embedded within a panel (because it is in a tab)..
    Anyway the problem I have is that I can't change the font on the table headings. I can change the font in the properties tab, but it doesn't reflect the changes in the table.
    Any suggestions!!
    Many Thanks in advance.
    Mouse

    Hi..Thanks for your reply
    I can't accually access the code because it is blocked. Ive dragged the GUI components off the tool bar and change the properties via the properties tab.
    I believe the way to change the font is by clicking on tableHeader and inserting some 'user code' but my coding isn't every good, so unsure as to what to put in.
    Thanks in advance.

  • Swing and databases

    Hi,
    I trying to implement the find ( search ) function for my database application. This is what I want to do .. I input data in any of the fields and hit search and if there is only one result then it should polulate all the fileds in the UI.. but if there are more than one results then I want it to open another window and then display a list of all the matchs and then the user should be able to chose what exactly he wants it should come back to the original window with all the fileds populated. I was wondering how exactly it needs to be done . I am not sure if I need to use frames or pop ups for the new window..
    I also need to capture the values when the user double clicks on any row from the lsit of all matches.
    Can someone help me with this one .
    thanks.
    sandsouza

    I voted for the enhancement request. It is almost exactly what I am concerned with.
    I am a big fan of Excelsior Jet. I tried out the free version about a year-and-a-half ago, and was pretty happy with it. It was actually the only machine-code compiler I tried out of several that worked. If I ever get to the point where I can start selling my app, I expect that I'll use it. I've been checking the website every so often since then, and reading about the next version, where a JRE can be included in the distribution. That helped spark my original question. While the worry about making sure my application had the right JRE version will be solved, it still bugs me that I have to ship so much unnecessary JRE code. (I blame Sun for that, not Excelsior Jet.) I was wondering if it was at all technically feasible to strip out the unnecessary code, irrespective of the legal issues. When compiled to byte-code, my program is under 1 MB. When I compiled it to machine code under JDK 1.4, it was about 5 MB. I imagine that compiling to machine-code with the included 1.5 JRE, after compression, will result in a size in the 15-20 MB range. And this after refactoring my program to where it's about 1/3 it's original size. I'm really worried about the direction this is going, and I don't even want to think about what including the 1.6 JRE will require.
    Where did you read that I've been programming Java since '97. I was a contractor at Sun between 1995 and 1997, and started working on Java 1.0 apps back then, but I don't ever remember mentioning that. If you asked because you're thinking I should know more about JVM/JRE issues, you're probably right, but I focus almost exclusively on higher-level application and GUI/Graphics issues. The deep-down Java stuff makes me break out into a cold-sweat.

  • Retrieve data from SQL database and put into a table

    Hi all, i encountered this error while trying to create a table in 1 of my panels:
    C:\Documents and Settings\L311c01\Desktop\FYPJ Java2\RFIDLogistics.java:25:{color:#ff0000} cannot find symbol
    symbol : class ResultSetTable
    {color}location: class jdbc_bible.part2.RFIDLogistics
    private static ResultSetTable model = new ResultSetTable();
    ^
    C:\Documents and Settings\L311c01\Desktop\FYPJ Java2\RFIDLogistics.java:25: {color:#ff0000}cannot find symbol
    symbol : class ResultSetTable
    {color}location: class jdbc_bible.part2.RFIDLogistics
    private static ResultSetTable model = new ResultSetTable();
    I understand that " cannot find symbol class ResultSetTable means that i need to import something which has this ResultSetTable. I suppose my imports are sufficient and i think the error is with the package that i included.
    This package was taken from an example in a book named java database programming bible, so i assumed it is reliable and i use it for my insert statement, which had a DataInserter.
    Could someone plz help me with this? Thanks alot in advance.
    Here are the codes:
    {color:#ff0000}package jdbc_bible.part2;{color}
    import java.sql.*;
    import javax.swing.*;
    import java.util.Vector;
    import javax.swing.table.AbstractTableModel;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.io.*;
    import java.util.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.border.*;
    import sun.jdbc.odbc.JdbcOdbcDriver;
    public class RFIDLogistics extends JFrame{
    //Components
    // public SimpleClock clock;
    private static JTable jt;
    private static ResultSetTable model = new ResultSetTable();
    some codes
    {color:#ff0000}try
    {{color}
    {color:#ff0000} DataInserter inserter = new DataInserter();
    String SQLCommand = "INSERT INTO " + flstr + " (Item_ID,Location_ID) VALUES ('"+Item_ID1+"','"+Location_ID1+"')";
    String SQLCommand2 = "UPDATE Location SET Item_ID = '"+Item_ID1+"' WHERE Location_ID = '"+Location_ID1+"'";
    inserter.execute(SQLCommand);
    inserter.execute(SQLCommand2);
    {color} JOptionPane.showMessageDialog(null, "Successful!");
    catch(ClassNotFoundException f)
    f.printStackTrace();
    catch(SQLException f)
    f.printStackTrace();
    some codes
    public JPanel rightPanel() {
    JPanel rightPanel = new JPanel();
    rightPanel.setLayout(new BoxLayout(rightPanel, BoxLayout.Y_AXIS));
    //Forklift title Panel
    JPanel panel6 = new JPanel();
    panel6.setBorder(new TitledBorder(""));
    panel6.setPreferredSize(new Dimension(192,33));
    panel6.add(forkliftDetails);
    //Forklift 1 Panel
    {color:#ff0000} JPanel panel7 = new JPanel();
    panel7.setBorder(new TitledBorder("Forklift 1"));
    panel7.setPreferredSize(new Dimension(192,120));{color}
    {color:#ff0000} String query = "SELECT * FROM Forklift1";
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:RFID Logistics");
    PreparedStatement pstmt = con.prepareStatement(query);
    ResultSet rs= pstmt.executeQuery();
    // display the data in jtable
    jt = new JTable();
    model.setResultSet(rs);
    jt.setModel(model);
    catch(ClassNotFoundException sqle){
    System.out.println(sqle);
    }catch(SQLException sqle){
    System.out.println(sqle);
    panel7.add(itemDetail1);
    itemDetail1TextField.setEditable(false);
    panel7.add(itemDetail1TextField);
    panel7.add(locationDetail1);
    locationDetail1TextField.setEditable(false);
    panel7.add(locationDetail1TextField);
    panel7.add(jt);
    {color}..
    //Main Method
    public static void main(String args[]) {
    RFIDLogistics app = new RFIDLogistics();
    app.setFrame();
    app.setResizable(false);
    app.setDefaultCloseOperation(EXIT_ON_CLOSE);
    app.setSize(1024,676);
    app.setLocation(0,60);
    app.setVisible(true);
    If you would like to try if my table can extract, here are the sample codes, just change ur database name which is highlighted in green, and the table name in blue.
    Codes:
    import java.sql.*;
    import javax.swing.*;
    import java.util.Vector;
    import javax.swing.table.AbstractTableModel;
    import java.awt.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.io.*;
    import java.util.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.border.*;
    import sun.jdbc.odbc.JdbcOdbcDriver;
    public class sample1{
    private static JFrame frm;
    private static JTable jt;
    private static ResultSetTable model = new ResultSetTable();
    public static void main(String args[]){
    String query = "SELECT * FROM {color:#00ccff}Forklift1{color}";
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:{color:#00ff00}RFID Logistics{color}");
    PreparedStatement pstmt = con.prepareStatement(query);
    ResultSet rs= pstmt.executeQuery();
    // display the data in jtable
    jt = new JTable();
    model.setResultSet(rs);
    jt.setModel(model);
    frm = new JFrame("Sample");
    frm.setSize(400,400);
    frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frm.add(jt);
    frm.setVisible(true);
    }catch(ClassNotFoundException sqle){
    System.out.println(sqle);
    }catch(SQLException sqle){
    System.out.println(sqle);
    Could someone plz help me with this? Thanks alot in advance.

    public JTable populateTable()
      String[] colNames = new String[] {"ID","NAME","SURNAME"};
      return new JTable(getSQLData(), colNames);
    public Object[][] getSQLData()
      stmt = conn.createStatement();
      ResultSet rs = stmt.executeQuery("SELECT [ID], [NAME], [SURNAME] FROM [USERS]");
      Object[][[] out = new Object[rs.getFetchSize()][3];//Not sure on getFetchSize but it should work
      int i = 0;
      while(rs.next())
        out[0] = rs.getInt(1);
    out[i][1] = rs.getString(2);
    out[i++][2] = rs.getString(3);
    return out;
    The above code will create a JTable with the data retrieved from the DB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for

  • How we can restrict remote user to access same URL?

    HI, We have two remote sites A and B. Site-A    ---  Users accessing application by using this URL: http://frsys.abc.com.pk:7777/forms/frmservlet?config=sales Site-B    ---  Users accessing application by using this URL: http://frsys.abc.com.pk:7777/

  • Crash with Indesign CS6 and Keyboard Maestro

    Anyone else experiencing crashes when using Keyboard Maestro with Indesign CS6 on OSX Mavericks? (Latest update of all mentioned apps). Indesign crashes when I try to copy certain items in Indesign, but it is not possible to narrow down which. Happen

  • Can I send a report from apex to a non-apex user?

    I am new to apex, and using ver 2.0. The users would like to click "email this report", put in any email address (someone internal to the organization or external), and have an html file sent to the recipient, that is the report they were just review

  • Problem while returning Excise material

    Dear Experts, While Returning a material through MIGO return Delivery . I am getting th following error. "Qty balances are not sufficient in the register". Regards, Kapil.

  • Macbook Pro not charging during some Bootcamp usage

    I have a Macbook Pro bough mid 2010. I put Bootcamp (windows 7) on a partitioned hard drive in winter of 2010 for school needs. Now I have upgraded my Mac OSX to Lion 10.7.2 and whenever I run any games or big programs on my Windows side it stops cha