Pls Help...Refreshing of JTable

Hii,
I am represinging data from database in JTable.I want it get refreshed and represent updated data.How can i do that
Pls help me if u can
Thanx
Your Friend

Hi,
if your data model is a subclass of AbstractTableModel simply fireTableDataChanged() after you have updated your model - JTable is a table model listener to its model and will update its view accordingly. There are more fire.... methods in AbstractTableModel, choose that one, that reflects your changes best in order to avoid too much repaint action.
greetings Marsian

Similar Messages

  • Help! how to refresh the JTable of a class from another thread class

    there is an application, in server side ,there are two classes, one is a class called face class that screen a JTable, another is a class the a thread ,which accept socket from client, when it accept the client socket, it deal the data and insert into db,then notify the face class to refresh the JTable,but in the thread class I used JTable's revalidate() and updateUI() method, the JTable does not refresh ,how should i do, pls give me help ,thank you very much

    thank you very much !
    i tried it ,but the TableModel i used like this ,and how to change the TableModel?
    here the files of mine ,pls give me some help,thank you very much
    1,first file is a class that create a JInternalFrame,and on it there is a table
    public class OutFace{
    public JInternalFrame createOutFace(){
    JInternalFrame jf = new JInternalFram();
    TableModel tm = new MyTableModel();
    JTable jt = new JTable(tm);
    JScrollPane jsp = new JScrollPane();
    jsp.add(jt);
    jf.getContentPane().add(jsp);
    return jf;
    2,the second file is the main face ,there is a button,when press the button,screen the JInternalFrame. there is also a thread is beggining started .
    public class MainFace extends JFrame implements ActionListener,Runnable{
    JButton jb = new JButton("create JInternalFrame");
    jb.addActionListener(this);
    JFrame fram = new JFrame();
    public void performance(ActionEvent e){
    JInternalFrame jif = new OutFace().createOutFace(); frame.getContentPane().add(JInternalFrame,BorderLayout.CENTER);
    public static void main(String[] args){
    frame.getContentPane().add(jb,BorderLayout.NORTH);
    frame.pack();
    frame.setVisible(true);
    ServerSokct ss = new ServerSocket(10000);
    Socket skt = ss.accept()'
    new ServerThread(skt).start();
    3.the third file is a thread class, there is a serversoket ,and accept the client side data,and want to refresh the JTable of the JInternalFrame
    public class ServerThread extends Thread{
    private skt;
    public ServerThread(Sokcet skt){
    this.skt = skt;
    public void run(){
    OutputObjectStream oos = null;
    InputObjectStream ios = null;
    try{
    Boolean flag = flag;
    //here i want to refresh the JTable,how to write?? }
    catch(){}
    4.second is the TableModel
    public class MyTableModel{
    public TableModel createTableModel(){
    String[][] data = getData();
    TableModel tm = AbstractTableModel(
    return tm;
    public String[][] getData(){
    }

  • Hi experts pls help me with this materialized view refresh time!!!

    Hi Expeerts ,
    Please clarify my doubt about this materialized view code
    [\n]
    CREATE MATERIALIZED VIEW SCHEMANAME.products_mv
    REFRESH WITH ROWID
    AS SELECT * from VIEW_TABLE@DATAOPPB;
    [n]
    Here i am creating a materialized view named products_mv of the view_table present in the remote server.Can anyone tell me when will my table product_mv will get refreshed if i follow this code.As what i read from the books is that the refresh period is implicit and is carried out by the database implicitly.so can u tell me suppose i insert 2 new records into my view_table when will this record get updated into my product_mv table.
    I cant use primary key approach so this is the approach i am following .Kindly help me in understanding when will refresh of records occur in the materialized view product_mv...Pls help
    regards
    debashis

    Hi Justin ,
    Yes, my database can reasonably schedule other jobs too .Its not an issue.
    Actually what i meant "fine in all aspects" is that will the matrerialized view will get refreshed w.r.t the documetum_v table present in my remote server.This is all i need to refresh my materialized view .
    I queries the DBA_JOBS table .I could see the following result i have pasted below:-
    [\n]
    NLS_ENV
    MISC_ENV INSTANCE
    dbms_refresh.refresh('"WORKFLOW"."PRODUCTS_MV2"');
    JOB LOG_USER PRIV_USER
    SCHEMA_USER LAST_DATE LAST_SEC THIS_DATE THIS_SEC NEXT_DATE
    NEXT_SEC TOTAL_TIME B
    INTERVAL
    FAILURES
    WHAT
    [n]
    here WORKFLOW"."PRODUCTS_MV2 is the materialized view i have created.So can u tell me that whether we can predict our refresh part is functioning fine from this data.If so how?
    Actually i am asking u in details as i dont have much exposure to materialized view .I am using it for the very first time.
    Regds
    debashis

  • JTable pls help!

    Hi guys, i basically need to retrieve some data into a table from the database(mySql). but the data just cant be out. i need help from you all :).
    basically i have a form package, entity package, controller package, sqlAction package(where it calls things form the sql) and lastly dbController package. pls help me to see what have i miss out or done wrong, thanks a million!
    Form Package:
    package form;
    import javax.swing.*;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import sqlAction.EventLogAction;
    import controller.EventLogController;
    import entity.EventLog;
    private JTable getJTable_viewLog() {
              if (jTable_viewLog == null) {
                   jTable_viewLog = new JTable();
                   int row = 0;
                   int col = 0;
         String [] colName = {"Event ID", "Source","Event Description","Date Time", "IP"};
                    EventLog newEventLog = new EventLog();
                       EventLogController EventLogController = new EventLogController();
                  for (int i =0; i < row; i++) {
                                  for (int j = 0; j < col; j++) {
                                data[i][j] = newEventLog.getEID();
                                                    data[i][j] = newEventLog.getESource();
                                          data[i][j] = newEventLog.getEEvent();
                                          data[i][j] = newEventLog.getEDateTime();
                                          data[i][j] = newEventLog.getEIPAdd();
                             EventLogAction e = new EventLogAction();
                            e.getViewLog(newEventLog);
                   jTable_viewLog = new JTable(new DefaultTableModel(data,colName)){
                        * Prevent table from being edited.
                        private static final long serialVersionUID = 1L;
                        public boolean isCellEditable(int row, int col) { return false; }
                   jTable_viewLog.setBounds(new java.awt.Rectangle(27,30,450, 230));
              return jTable_viewLog;
              }Entity Package:
    package entity;
    public class EventLog {
         private String eID;
         private String eSource;
         private String eEvent;
         private String eDateTime;
         private String eIPAdd;
         public String getEID() {
              return eID;
         public void setEID(String eid) {
              eID = eid;
         public String getESource() {
              return eSource;
         public void setESource(String source) {
              eSource = source;
         public String getEEvent() {
              return eEvent;
         public void setEEvent(String event) {
              eEvent = event;
         public String getEDateTime() {
              return eDateTime;
         public void setEDateTime(String dateTime) {
              eDateTime = dateTime;
         public String getEIPAdd() {
              return eIPAdd;
         public void setEIPAdd(String add) {
              eIPAdd = add;
    }Controller Package:
    package controller;
    import sqlAction.EventLogAction;
    import entity.EventLog;
    public class ViewEventLogController {
    public void processGetViewLog(String eID,
                   String eSource,
                   String eEvent,
                   String eDateTime,
                   String eIPAdd)
              EventLog viewEve = new EventLog();
              EventLogAction va = new EventLogAction();
              viewEve.setEID(eID);
              viewEve.setESource(eSource);
              viewEve.setEEvent(eEvent);
              viewEve.setEDateTime(eDateTime);
              viewEve.setEIPAdd(eIPAdd);
              va.createEventPerform(viewEve);
    }sqlAction Package:
    package sqlAction;
    import dbController.DBController;
    import entity.EventLog;
    import java.sql.*;
    import java.util.*;
    public class EventLogAction {
         private String eID;
         private String eSource;
         private String eEvent;
         private String eDateTime;
         private String eIPAdd;
         private static EventLog newEventLog;
         public EventLogAction(){}
         public EventLogAction(String eID, String eSource, String eEvent, String eDateTime, String eIPAdd){           this.eID = eID;
              this.eSource = eSource;
              this.eEvent = eEvent;
              this.eDateTime = eDateTime;
              this.eIPAdd = eIPAdd;
    public EventLog getViewLog(EventLog viewEve){
              // Code to access db
              ResultSet rs = null;
              String dbQuery = "SELECT * FROM EventLog";
              DBController db = new DBController();
              System.out.println(dbQuery);
              db.setUp("cryptocrestSQL");
              rs = db.readRequest(dbQuery);
              try{
                   if (rs.next()){
                        String eID = rs.getString("eID");
                                                                    String eSource = rs.getString("eSource");
                        String eEvent = rs.getString("eEvent");
                        String eDateTime = rs.getString("eDateTime");
                        String eIPAdd = rs.getString("eIPAdd");;
                        EventLog el = new EventLog();
                        el.setEID(eID);
                        el.setESource(eSource);
                        el.setEEvent(eEvent);
                        el.setEDateTime(eDateTime);
                        el.setEIPAdd(eIPAdd);
              }catch (Exception e) {
                   e.printStackTrace();
              db.terminate();
              return newEventLog;
         public String getEID() {
              return eID;
         public void setEID(String eid) {
              eID = eid;
         public String getESource() {
              return eSource;
         public void setESource(String source) {
              eSource = source;
         public String getEEvent() {
              return eEvent;
         public void setEEvent(String event) {
              eEvent = event;
         public String getEDateTime() {
              return eDateTime;
         public void setEDateTime(String dateTime) {
              eDateTime = dateTime;
         public String getEIPAdd() {
              return eIPAdd;
         public void setEIPAdd(String add) {
              eIPAdd = add;
    }dbController Package:
    package dbController;
    * Program Name :     DBController.java
    * Description: DBController class to access the database.
    * Remember to set up the odbc using control panel.
    import java.sql.*;
    public class DBController {
         private Connection con;
         private ResultSet rs;
          * Method Name : setUp Input
          * Parameter : String (Data Source Name)
          * Purpose : Load the database driver and establish connection
          * Return : nil
         public void setUp(String dsn) {
              // load the database driver
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch (Exception e) {
                   System.out.println("Load driver error");
              // after loading the driver, establish a connection
              try {
                   String s = "jdbc:odbc:" + dsn;
                   con = DriverManager.getConnection(s, "", "");
                   System.out.println("connection is " + s);
              } catch (Exception e) {
                   e.printStackTrace();
          * Method Name : getColumnNames
          * Purpose : Obtain the column names of the result set
          * Return : Array of String
         public String[] getColumnNames() {
              String[] columnNames = null;
              try {
                   // Get result set meta data
                   ResultSetMetaData rsmd = rs.getMetaData();
                   columnNames = new String[rsmd.getColumnCount()];
                   // Get the column names; column indices start from 1
                   for (int i = 0; i < columnNames.length; i++) {
                        columnNames[i] = rsmd.getColumnName(i + 1);
              } catch (SQLException e) {
                   System.out.println("Error in getColumnNames() in DBController");
                   e.printStackTrace();
              return columnNames;
          * Method Name : readRequest
          * Input Parameter : String (database query)
          * Purpose : Obtain the result set from the db query
          * Return : resultset (records from the query)
         public ResultSet readRequest(String dbQuery) {
              ResultSet rs = null;
              System.out.println("DB Query: " + dbQuery);
              try {
                   // create a statement object
                   Statement stmt = con.createStatement();
                   // execute an SQL query and get the result
                   rs = stmt.executeQuery(dbQuery);
                   this.rs = rs;
              } catch (Exception e) {
                   e.printStackTrace();
              return rs;
          * Method Name : updateRequest Input Parameter : String (database query) Purpose :
          * Execute udpate using the db query Return : int (count is 1 if successful)
         public int updateRequest(String dbQuery) {
              int count = 0;
              // System.out.println("DB: " + dbQuery);
              try {
                   // create a statement object
                   Statement stmt = con.createStatement();
                   // execute an SQL query and get the result
                   count = stmt.executeUpdate(dbQuery);
              } catch (Exception e) {
                   e.printStackTrace();
              return count;
          * Method Name : terminate
          * Input Parameter : nil
          * Purpose : Close db conection
          * Return :nil
         public void terminate() {
              // close connection
              try {
                   con.close();
                   System.out.println("Connection is closed");
              } catch (Exception e) {
                   e.printStackTrace();
    } // end of DBControllerEdited by: Titus-tan on Jul 9, 2008 1:33 AM

    First off, your code style sucks. Consistent indentation would be nice. Don't mix spaces and tabs.
    package form;
    import javax.swing.*;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.JLabel;
    import javax.swing.JTextField;At this point, you've already imported JLabel and JTextField, no need to do it again.
    jTable_viewLog.setBounds(new java.awt.Rectangle(27,30,450, 230));Don't use setBounds to set the size of a Swing component, it'll just get wiped out when the layout manager does its thing.
    Use setPreferredSize instead.
    As for your database class, why are you passing queries into it? It should know how to pull the data out of the database and keep its queries internal.
    Not only will it be a cleaner design, you significantly reduce the possibility of executing bad queries. Also, PreparedStatements are almost always preferred
    over normal Statements, especially when combined with parameterized queries. Go google "Bobby Tables" if you don't understand why.
    Now then, what is it doing and what did you expect it to be doing?

  • Pls Help :JTable Double Value Editing Problem

    hi friends
    as i am new to swings and Jtable pls help me if u can.
    in the code copied below when i start putting value into the Double column of JTable
    a ( .0 ) is appended at the end which is undesirable it should be like that only when the value is
    something like 22.99 and also i want to limit the double value's fractional part to be limited to 2 digits only.
    if this can be done in my Table model itself so that it will work everywhere i use this model
    Pls tell me what exactly do i need, a custom Cell Editor or Cell Renderer. and whether can i do it in the
    Table Model Defination class or whether i can only do it on the Jtable only.
    guys its so confusing.pls help
    if anyone can send a sample code for achieving this it would be of great help
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.text.*;
    public class TableProcessing extends JFrame implements TableModelListener
        JTable table;
        public TableProcessing()
            String[] columnNames = {"Item", "Quantity", "Price", "Cost"};
            Object[][] data =
                {"Bread", new Integer(1), new Double(1.11), new Double(1.11)},
                {"Milk", new Integer(1), new Double(2.22), new Double(2.22)},
                {"Tea", new Integer(1), new Double(3.33), new Double(3.33)},
                {"Cofee", new Integer(1), new Double(4.44), new Double(4.44)}
            DefaultTableModel model = new DefaultTableModel(data, columnNames);
            model.addTableModelListener( this );
            table = new JTable( model )
                //  Returning the Class of each column will allow different
                //  renderers to be used based on Class
                public Class getColumnClass(int column)
                    return getValueAt(0, column).getClass();
                //  The Cost is not editable
                public boolean isCellEditable(int row, int column)
                    if (column == 3)
                        return false;
                    else
                        return true;
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            JScrollPane scrollPane = new JScrollPane( table );
            getContentPane().add( scrollPane );
         *  The cost is recalculated whenever the quantity or price is changed
        public void tableChanged(TableModelEvent e)
            if (e.getType() == TableModelEvent.UPDATE)
                int row = e.getFirstRow();
                int column = e.getColumn();
                if (column == 1 || column == 2)
                    int    quantity = ((Integer)table.getValueAt(row, 1)).intValue();
                    double price = ((Double)table.getValueAt(row, 2)).doubleValue();
                    Double value = new Double(quantity * price);
                    table.setValueAt(value, row, 3);
        public static void main(String[] args)
            TableProcessing frame = new TableProcessing();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.pack();
            frame.setLocationRelativeTo( null );
            frame.setVisible(true);
    }thank in advance
    jags

    No.
    But further to this try:
    public class MyCustomRenderer  extends javax.swing.table.DefaultTableCellRenderer
              private java.text.DecimalFormat FORMAT_DOUBLE;
              public MyCustomRenderer()
                      FORMAT_DOUBLE = new java.text.DecimalFormat("#, ##0.00");
              public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
                        //NB! you could also set foreground/background here to indicate positive/negative values...
                        if(value.getClass().equals(Double.class))//is this a double?
                                double d = ((Double)value).doubleValue();
                                d = (Double.isNaN(d)||Double.isInfinity(d))?0:d;
                                this.setText(FORMAT_DOUBLE.format(d));
                        else//not a double so let's toString() it...
                               this.setText(""+value);
    }then, using code pasted above, specify a new instance of this class as the default renderer in your
    table.....
    :)

  • Help!!! Refreshing  a JTable??

    Hi. i have a web site where things are bought, which in turn updates a table in a database, how can i view the orders as they are being made in a jtable dynamicaly. i can view the static table, i have tried to call the table method inside the javax.swing.timer and nothing happens, jus the same old static table. i just need to be able to refresh the jtable as the table expands in the database??

    Requery the database on your timer events and use the new result set to update the table.

  • How to refresh a JTable of a class from another thread class?

    there is an application, in server side ,there are four classes, one is a class called face class that create an JInternalFrame and on it screen a JTable, another is a class the a thread ,which accept socket from client, when it accept the client socket, it deal the data and insert into db,then notify the face class to refresh the JTable,but in the thread class I used JTable's revalidate() and updateUI() method, the JTable does not refresh ,how should i do, pls give me help ,thank you very much
    1,first file is a class that create a JInternalFrame,and on it there is a table
    public class OutFace{
    public JInternalFrame createOutFace(){
    JInternalFrame jf = new JInternalFram();
    TableModel tm = new MyTableModel();
    JTable jt = new JTable(tm);
    JScrollPane jsp = new JScrollPane();
    jsp.add(jt);
    jf.getContentPane().add(jsp);
    return jf;
    2,the second file is the main face ,there is a button,when press the button,screen the JInternalFrame. there is also a thread is beggining started .
    public class MainFace extends JFrame implements ActionListener,Runnable{
    JButton jb = new JButton("create JInternalFrame");
    jb.addActionListener(this);
    JFrame fram = new JFrame();
    public void performance(ActionEvent e){
    JInternalFrame jif = new OutFace().createOutFace(); frame.getContentPane().add(JInternalFrame,BorderLayout.CENTER);
    public static void main(String[] args){
    frame.getContentPane().add(jb,BorderLayout.NORTH);
    frame.pack();
    frame.setVisible(true);
    ServerSokct ss = new ServerSocket(10000);
    Socket skt = ss.accept()'
    new ServerThread(skt).start();
    3.the third file is a thread class, there is a serversoket ,and accept the client side data,and want to refresh the JTable of the JInternalFrame
    public class ServerThread extends Thread{
    private skt;
    public ServerThread(Sokcet skt){
    this.skt = skt;
    public void run(){
    OutputObjectStream oos = null;
    InputObjectStream ios = null;
    try{
    Boolean flag = flag;
    //here i want to refresh the JTable,how to write??
    catch(){}
    4.second is the TableModel
    public class MyTableModel{
    public TableModel createTableModel(){
    String[][] data = getData();
    TableModel tm = AbstractTableModel(
    return tm;
    public String[][] getData(){
    }

    Use the "code" formatting tags when posting code.
    Read this article on [url http://www.physci.org/codes/sscce.jsp]Creating a Simple Demo Program before posting any more code.
    Here is an example that updates a table from another thread:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=435487

  • Passing values to BAPI's - pls help

    Hi,
    I have some datas in z-table, I want to pass that datas to IW31 tr-code. I collected all BAPI's and I need help about How to call and Pass the values through BAPI. Pls help me.....
    Thanks in Advance,
    Sunil

    Hi!
    It is an easy working one for me... Depending on your customizing, please change the hardcoded parts, like order type, and so on...
    *& Report Z_BAPI_ALM_ORDER_MAINTAIN_TEST *
    REPORT z_bapi_alm_order_maintain_test.
    DATA: it_methods LIKE STANDARD TABLE OF bapi_alm_order_method,
    wa_methods LIKE LINE OF it_methods.
    DATA: it_header LIKE STANDARD TABLE OF bapi_alm_order_headers_i,
    wa_header LIKE LINE OF it_header.
    DATA: it_operation LIKE STANDARD TABLE OF bapi_alm_order_operation,
    wa_operation LIKE LINE OF it_operation.
    DATA: it_text LIKE STANDARD TABLE OF bapi_alm_text,
    wa_text LIKE LINE OF it_text.
    DATA: et_numbers LIKE STANDARD TABLE OF bapi_alm_numbers,
    wa_numbers LIKE LINE OF et_numbers.
    DATA: gt_return LIKE STANDARD TABLE OF bapiret2.
    START-OF-SELECTION.
    METHODS SECTION
    MOVE '1' TO wa_methods-REFNUMBER.
    MOVE 'HEADER' TO wa_methods-objecttype.
    MOVE 'CREATE' TO wa_methods-method.
    MOVE '%00000000001' TO wa_methods-objectkey.
    INSERT wa_methods INTO TABLE it_methods.
    MOVE '1' TO wa_methods-REFNUMBER.
    MOVE 'OPERATION' TO wa_methods-objecttype.
    MOVE 'CREATE' TO wa_methods-method.
    MOVE '%000000000010010' TO wa_methods-objectkey.
    INSERT wa_methods INTO TABLE it_methods.
    MOVE '1' TO wa_methods-REFNUMBER.
    MOVE '' TO wa_methods-objecttype.
    MOVE 'SAVE' TO wa_methods-method.
    MOVE '%00000000001' TO wa_methods-objectkey.
    INSERT wa_methods INTO TABLE it_methods.
    HEADER SECTION
    MOVE '%00000000001' TO wa_header-orderid.
    MOVE 'D210' TO wa_header-order_type.
    MOVE '2000' TO wa_header-planplant.
    MOVE '19' TO wa_header-mn_wk_ctr.
    MOVE '2000' TO wa_header-plant.
    MOVE 'CUV-SZV-CSUR-ATEM-I...' TO wa_header-funct_loc.
    MOVE '' TO wa_header-equipment.
    MOVE '' TO wa_header-material.
    MOVE 'SAMPLE TEXT HEADER' TO wa_header-short_text.
    INSERT wa_header INTO TABLE it_header.
    OPERATION SECTION
    MOVE '10' TO wa_operation-activity.
    MOVE '' TO wa_operation-sub_activity.
    MOVE '' TO wa_operation-standard_text_key.
    MOVE 'SAMPLE TEXT OPERATION' TO wa_operation-description.
    MOVE '' TO wa_operation-vendor_no.
    MOVE 3 TO wa_operation-quantity.
    MOVE 'KG' TO wa_operation-base_uom.
    INSERT wa_operation INTO TABLE it_operation.
    REFRESH et_numbers.
    CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
    TABLES
    it_methods = it_methods
    it_header = it_header
    IT_HEADER_UP =
    IT_HEADER_SRV =
    IT_HEADER_SRV_UP =
    IT_USERSTATUS =
    IT_PARTNER =
    IT_PARTNER_UP =
    it_operation = it_operation
    IT_OPERATION_UP =
    IT_RELATION =
    IT_RELATION_UP =
    IT_COMPONENT =
    IT_COMPONENT_UP =
    IT_TEXT = it_text
    IT_TEXT_LINES =
    EXTENSION_IN =
    RETURN = gt_return
    et_numbers = et_numbers
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    CHECK GT_RETURN FOR POSSIBLE FAILURES
    Regards
    Tamá

  • Problem with Eclipse  -- pls help

    hi
    When i execute the application in debug mode with one break point :
    These are the errors i get and the compiler is not stopping at the break point .
    Pls help :
    Thread [main] (Suspended (exception ClassNotFoundException))     
         ClassLoader.findBootstrapClass(String) line: not available [native method]     
         Launcher$ExtClassLoader(ClassLoader).findBootstrapClass0(String) line: not available     
         Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: not available     
         Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: not available     
         Launcher$AppClassLoader.loadClass(String, boolean) line: not available     
         Launcher$AppClassLoader(ClassLoader).loadClass(String) line: not available     
         Launcher$AppClassLoader(ClassLoader).loadClassInternal(String) line: not available

    If the compiler is not stopping at your breakpoint, then it probably means that the java code you're looking at and the compiled class file are out of synch. If you're getting a classnotfound, then your classfile most likely is either not there or is not where expected.
    Check the output folder in project's properties (which may or may not be the default), and see if your classfiles are actually there. Perhaps there is some error that is preventing your classfile from being generated (Eclipse sometimes won't even be able to compile), so check the problems dialog.
    Try refreshing your project, and if all else fails, restart Eclipse/delete & create the project again. That sometimes magically fixes things. Otherwise, welcome to the quirkiness of dealing with Eclipse!

  • Pls help me writing logic:iterate tag in jsp page

    Hey guys , I am struck in retriving string p1,p2,p3 in the jsp page
    Pls have a look ata the code
    In DAO class:-
    StdprdDAO.java
    Public arrayList getPFP()
    ArrayList a = new ArrayList();
    While(rs.next())
         columnsVO colVO = new columnsVO;
         colVO.setProduct(rset.getString(1));//will store in String colProduct
         colVO.setFamily(rset.getString(2));//will store in String colFamily
    colVO.setPrice(rset.getString(3));//will store in String colPrice
    a.add(colVO);
    return a;
    In Action Class:-
    ArrayList final = null;
    StdprdDAO DAO = new stdprdDAO();
    final = DAO.getPFP();
    For(int i = 0; final !=null && i<final.size() ; i++)
         columnsVO VO = null;
         VO = (columnsVO)final.get(i);
         String p1 = (String) VO.getProduct();
         String p2 = (String) VO.getFamily();
         String p3 = (String) VO.getPrice();
         Request.setAttribute(“p1”,p1);
         Request.setAttribute(“p2”,p2);
         Request.setAttribute(“p3”,p3);
    In JSP PAGE:-
    id = “columnsVO”>
    <bean:write name = “columnsVO” property=”final” id=”p1”>
    but still I am doubting my above sentences in jsp page ,so pls correct them if possible.
    Instead of l;ogic:iterate can I use directly getattribute(“p1”)? <logic:iterate
    Still I m doubting I can not utilize columnsVO file in logic:iterate, I can utilize only formbean file.
    So pls help me with this.

    May I ask why have you done it?
    If it is related to printing of the list then it is of no use.But it IS of use. The objects compEmployees is in scope.
    It has the list we want to print out.
    With logic:iterate:
    <table>
         <tr>
           <th>Number</th>
           <th>Employee</th>
         </tr>
         <logic:iterate name="compEmployees" property="totalEmps" id="emp">
              <tr>
                <td>
                  <bean:write name="emp" property="empNo"/>
                </td>
                <td>
                  <bean:write name="emp" property="empName"/>
                </td>
              </tr>
         </logic:iterate>
    </table>or alternatively with JSTL and c:forEach
    <table>
         <tr>
           <th>Number</th>
           <th>Employee</th>
         </tr>
         <c:forEach items="${compEmployees.totalEmps}" var="emp">
              <tr>
                <td>
                  <c:out value="${emp.empNo}"/>
                </td>
                <td>
                  <c:out value="${emp.empName}"/>
                </td>
              </tr>
         </c:forEach>
    </table>Cheers,
    evnafets

  • Pls help me.. unable to get past mac login sreen!!

    Hello people, This is my first post and after much searching i am praying someone can help..!
    I have a mac g5 dual, and i am having a really annoying problem, my mac keyboard is not working, sometimes some of the keys work but others dont, or none of the keys work, or when i press a button it types a different letter or types 2 or 3 at once!!
    Therefore i can not get past the login screen as the keys needed for thre password do not work!! not even when i try to log into admin!!
    I have purchased a new keyboard today, (wireless apple) but i can not get that to work as i need to pair it to the mac before it will work but i cant pair without getting past the login screen!!!
    typical that this should happen on my only couple of days off too!!
    pls HELP ME
    thanks in advance..

    Yeah, I tried every port available.
    Is there anyway at all i can get into the system settings with a shortcut on startup?
    Then again Im still not sure that the keys will work to use a shortcut.
    Its odd because i managed (just) to login earlier in the day, but the keyboard just seemed to get steadily worse until none of the keys worked!!
    Cheers Dale
    any other ideas??

  • Can someone pls help me with this code

    The method createScreen() creates the first screen wherein the user makes a selection if he wants all the data ,in a range or single data.The problem comes in when the user makes a selection of single.that then displays the singleScreen() method.Then the user has to input a key data like date or invoice no on the basis of which all the information for that set of data is selected.Now if the user inputs a wrong key that does not exist for the first time the program says invalid entry of data,after u click ok on the option pane it prompts him to enter the data again.But since then whenever the user inputs wrong data the program says wrong data but after displaying the singlescreen again does not wait for input from the user it again flashes the option pane with the invalid entry message.and this goes on doubling everytime the user inputs wrong data.the second wrong entry of data flashes the error message twice,the third wrong entry flashes the option pane message 4 times and so on.What actually happens is it does not wait at the singlescreen() for user to input data ,it straight goes into displaying the JOptionPane message for wrong data entry so we have to click the optiion pane twice,four times and so on.
    Can someone pls help me with this!!!!!!!!!
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.text.*;
    import java.util.*;
    public class MainMenu extends JFrame implements ActionListener,ItemListener{
    //class     
         FileReaderDemo1 fd=new FileReaderDemo1();
         FileReaderDemo1 fr;
         Swing1Win sw;
    //primary
         int monthkey=1,counter=0;
         boolean flag=false,splitflag=false;
         String selection,monthselection,dateselection="01",yearselection="00",s,searchcriteria="By Date",datekey,smonthkey,invoiceno;
    //arrays
         String singlesearcharray[];
         String[] monthlist={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"};
         String[] datelist=new String[31];
         String[] yearlist=new String[100];
         String[] searchlist={"By Date","By Invoiceno"};
    //collection
         Hashtable allinvoicesdata=new Hashtable();
         Vector data=new Vector();
         Enumeration keydata;
    //components
         JButton next=new JButton("NEXT>>");
         JComboBox month,date,year,search;
         JLabel bydate,byinvno,trial;
         JTextField yeartext,invtext;
         JPanel panel1,panel2,panel3,panel4;
         JRadioButton single,range,all;
         ButtonGroup group;
         JButton select=new JButton("SELECT");
    //frame and layout declarations
         JFrame jf;
         Container con;
         GridBagLayout gridbag=new GridBagLayout();
         GridBagConstraints gc=new GridBagConstraints();
    //constructor
         MainMenu(){
              jf=new JFrame();
              con=getContentPane();
              con.setLayout(null);
              fr=new FileReaderDemo1();
              createScreen();
              setSize(500,250);
              setLocation(250,250);
              setVisible(true);
    //This is thefirst screen displayed
         public void createScreen(){
              group=new ButtonGroup();
              single=new JRadioButton("SINGLE");
              range=new JRadioButton("RANGE");
              all=new JRadioButton("ALL");
              search=new JComboBox(searchlist);
              group.add(single);
              group.add(range);
              group.add(all);
              single.setBounds(100,50,100,20);
              search.setBounds(200,50,100,20);
              range.setBounds(100,90,100,20);
              all.setBounds(100,130,100,20);
              select.setBounds(200,200,100,20);
              con.add(single);
              con.add(search);
              con.add(range);
              con.add(all);
              con.add(select);
              search.setEnabled(false);
              single.addItemListener(this);
              search.addActionListener(new MyActionListener());     
              range.addItemListener(this);
              all.addItemListener(this);
              select.addActionListener(this);
         public class MyActionListener implements ActionListener{
              public void actionPerformed(ActionEvent a){
                   JComboBox cb=(JComboBox)a.getSource();
                   if(a.getSource().equals(month))
                        monthkey=((cb.getSelectedIndex())+1);
                   if(a.getSource().equals(date)){
                        dateselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(year))
                        yearselection=(String)cb.getSelectedItem();
                   if(a.getSource().equals(search)){
                        searchcriteria=(String)cb.getSelectedItem();
         public void itemStateChanged(ItemEvent ie){
              if(ie.getItem()==single){
                   selection="single";     
                   search.setEnabled(true);
              else if (ie.getItem()==all){
                   selection="all";
                   search.setEnabled(false);
              else if (ie.getItem()==range){
                   search.setEnabled(false);
         public void actionPerformed(ActionEvent ae){          
              if(ae.getSource().equals(select))
                        if(selection.equals("single")){
                             singleScreen();
                        if(selection.equals("all"))
                             sw=new Swing1Win();
              if(ae.getSource().equals(next)){
                   if(monthkey<9)
                        smonthkey="0"+monthkey;
                   System.out.println(smonthkey+"/"+dateselection+"/"+yearselection+"it prints this");
                   allinvoicesdata=fr.read(searchcriteria);
                   if (searchcriteria.equals("By Date")){
                        System.out.println("it goes in this");
                        singleinvoice(smonthkey+"/"+dateselection+"/"+yearselection);
                   else if (searchcriteria.equals("By Invoiceno")){
                        invoiceno=invtext.getText();
                        singleinvoice(invoiceno);
                   if (flag == false){
                        System.out.println("flag is false");
                        singleScreen();
                   else{
                   System.out.println("its in here");
                   singlesearcharray=new String[data.size()];
                   data.copyInto(singlesearcharray);
                   sw=new Swing1Win(singlesearcharray);
         public void singleinvoice(String searchdata){
              keydata=allinvoicesdata.keys();
              while(keydata.hasMoreElements()){
                        s=(String)keydata.nextElement();
                        if(s.equals(searchdata)){
                             System.out.println(s);
                             flag=true;
                             break;
              if (flag==true){
                   System.out.println("vector found");
                   System.exit(0);
                   data= ((Vector)(allinvoicesdata.get(s)));
              else{
                   JOptionPane.showMessageDialog(jf,"Invalid entry of date : choose again");     
         public void singleScreen(){
              System.out.println("its at the start");
              con.removeAll();
              SwingUtilities.updateComponentTreeUI(con);
              con.setLayout(null);
              counter=0;
              panel2=new JPanel(gridbag);
              bydate=new JLabel("By Date : ");
              byinvno=new JLabel("By Invoice No : ");
              dateComboBox();
              invtext=new JTextField(6);
              gc.gridx=0;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(month,gc);
              panel2.add(month);
              gc.gridx=1;
              gc.gridy=0;
              gridbag.setConstraints(date,gc);
              panel2.add(date);
              gc.gridx=2;
              gc.gridy=0;
              gc.gridwidth=1;
              gridbag.setConstraints(year,gc);
              panel2.add(year);
              bydate.setBounds(100,30,60,20);
              con.add(bydate);
              panel2.setBounds(170,30,200,30);
              con.add(panel2);
              byinvno.setBounds(100,70,100,20);
              invtext.setBounds(200,70,50,20);
              con.add(byinvno);
              con.add(invtext);
              next.setBounds(300,200,100,20);
              con.add(next);
              if (searchcriteria.equals("By Invoiceno")){
                   month.setEnabled(false);
                   date.setEnabled(false);
                   year.setEnabled(false);
              else if(searchcriteria.equals("By Date")){
                   byinvno.setEnabled(false);
                   invtext.setEnabled(false);
              monthkey=1;
              dateselection="01";
              yearselection="00";
              month.addActionListener(new MyActionListener());
              date.addActionListener(new MyActionListener());
              year.addActionListener(new MyActionListener());
              next.addActionListener(this);
              invtext.addKeyListener(new KeyAdapter(){
                   public void keyTyped(KeyEvent ke){
                        char c=ke.getKeyChar();
                        if ((c == KeyEvent.VK_BACK_SPACE) ||(c == KeyEvent.VK_DELETE)){
                             System.out.println(counter+"before");
                             counter--;               
                             System.out.println(counter+"after");
                        else
                             counter++;
                        if(counter>6){
                             System.out.println(counter);
                             counter--;
                             ke.consume();
                        else                    
                        if(!((Character.isDigit(c) || (c == KeyEvent.VK_BACK_SPACE) || (c == KeyEvent.VK_DELETE)))){
                             getToolkit().beep();
                             counter--;     
                             JOptionPane.showMessageDialog(null,"please enter numerical value");
                             ke.consume();
              System.out.println("its at the end");
         public void dateComboBox(){          
              for (int counter=0,day=01;day<=31;counter++,day++)
                   if(day<=9)
                        datelist[counter]="0"+String.valueOf(day);
                   else
                        datelist[counter]=String.valueOf(day);
              for(int counter=0,yr=00;yr<=99;yr++,counter++)
                   if(yr<=9)
                        yearlist[counter]="0"+String.valueOf(yr);
                   else
                        yearlist[counter]=String.valueOf(yr);
              month=new JComboBox(monthlist);
              date=new JComboBox(datelist);
              year=new JComboBox(yearlist);
         public static void main(String[] args){
              MainMenu mm=new MainMenu();
         public class WindowHandler extends WindowAdapter{
              public void windowClosing(WindowEvent we){
                   jf.dispose();
                   System.exit(0);
    }     

    Hi,
    I had a similar problem with a message dialog. Don't know if it is a bug, I was in a hurry and had no time to search the bug database... I found a solution by using keyPressed() and keyReleased() instead of keyTyped():
       private boolean pressed = false;
       public void keyPressed(KeyEvent e) {
          pressed = true;
       public void keyReleased(KeyEvent e) {
          if (!pressed) {
             e.consume();
             return;
          // Here you can test whatever key you want
       //...I don't know if it will help you, but it worked for me.
    Regards.

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • Java Web Start- Cannot launch Application. Pls help

    HI
    Ia m beginner in java web start. I creaate a simple swing application and try to launch it through web start. But I failed. My application jar file (sample.jar)contains only class files. No menifest file. Then I sign my "sample.jar" file and placed inside tomcat server: "webapps/root/WebStart/Sample". I also placed the "sample.jnlp" file in the above directory.The name of my main class is :"Sample" .Here is the content of sample.jnlp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
      codebase="http://165.231199.164:8080"
    >
    <information>
      <title>Sample Launching Test</title>
      <vendor>FMO</vendor> 
      <homepage href="www.sun.com" />
      <description>Demonstration of JNLP</description>
    </information>
    <offline-allowed/>
    <security>
      <all-permissions/>
    </security>
    <resources>
      <j2se version="1.2+" />
      <jar href="/WebStart/Sample/sample.jar"/>
    </resources>
    <application-desc main-class="Sample" />
    </jnlp>Whenever I try to launch this application from the browser , it shows me following :
    An error occurred while launching/running the application.
    Title: Sample Launching Test
    Vendor: FMO
    Category: Unexpected Error
    RED
    Anybody pls help me here about how to Launch my application. Am I missing something?

    I fixed the porblem by modifying the sample.jnlp file. Here is the latest version:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase=http://[my-ip-address]:8080/WebStart/Sample>
    <href="sample.jnlp">
    <information>
      <title>Sample Launching Test</title>
      <vendor>FMO</vendor> 
      <homepage href="www.sun.com" />
      <description>Demonstration of JNLP</description>
      <offline-allowed/>
    </information>
    <security>
      <all-permissions/>
    </security>
    <resources>
      <j2se version=1.4+ />
      <jar href="sample.jar"/>
    </resources>
    <application-desc main-class="Sample" />
    </jnlp>

  • Iphone not syncing after updating itunes 10.5. pls help

    Hi apologies but I am new to all this stuff.  I updated itunes to version 10.5 and I think my iphone 4 was synced in during this.  After itunes had updated I found that my iphone wasnt synced in any longer.  I pulled out connecter and re connected but still nothing.  Rang apple tech support (on hold for an hour in cue).  They tried couple of things and then advised to uninstall itunes then reinstall.  I have done that but still not recognising iphone.  I can sync to my other apple computer but if I try and upgrade to iOS5 on that it says I need to go to the normal computer it is synced with or I'll lose some apps etc.  I dont think my iphone has the latest iOS 5 on it yet.  Can anyone pls help?  Apple support now closed :-(  thanks

    I am also in the same boat.
    Windows 7 on Alienware laptop - no problems at all until upgrade of iTunes client to 10.5. 
    After the upgrade, attempts to sync my iPhone 4 hang at "Step 1 of 4: Backing up Rob's iPhone" (for over 12 hours)
    I have read hundreds of documents with various solutions.
    1) Delete backup file from C:\Users\<name>\AppData\Roaming\Apple Computer\MobileSync\Backup
    2) Stop stuck MDCrashReport and AppleMobileBackup processes
    3) Reinstall iTunes
    It all FAILS.  I work in IT and can assure you that nothing changed but whatever was changed by the iTunes application as it was upgraded to 10.5.  This 2 day extravaganza is ridiculously frustrating and creating a rabid anti-apple sentiment in my house.  Why the F would you (Apple) release something that is mandatory for me to use with my iPhone and have it be this buggy P.O.S.?  (Rhetorical - no need to answer, please just fix this problem so I can sync and backup my phone).
    Non-plussed

Maybe you are looking for

  • Unrecognized DVD/CD drive after I-tunes upgrade to ver 7.6.2.9

    I have a problem since I upgraded I-tunes to latest version 7.6.2.9. My PC no longer recognizes my DVD/CD Rom. I have deleted my Upper and Lower filters in the registry, then reboot my CD-Rom is back. I open I-tunes and the program does not see my CD

  • My App store icon is gone

    My app store icon is gone

  • My ipod won't detect my wireless modem

    I have a Belkin ADSL Modem with wireless G router and my ipod touch will not detect it, it detects 4 other networks but they all need passwords and the only one I can connect to still does not allow me to go onto the interent because the IP address s

  • Camera kit not working? I may have an explanation

    So I bought the camera kit today. Plug the SD card reader and nothing happen. Hmm! Try the camera with it's cable, not working. Hmmm... Try the same with my wife's Ipad and it works first shot!...Oh no! Please make so that it's not a defective Ipad.

  • Application Support-Aperture-Plug ins folder not found

    I'm trying to install flash album explorer plug in. I'm trying to find Application Support-Aperture-Plug ins to innstall it but I'm not able to find it. I was searching in every library under user, system, and I haven't been able to fint it....please