Results 1 to 1 of 1
  1. #1
    doha786 is offline Member
    Join Date
    Mar 2009
    Rep Power

    Arrow need help for calling method


    i have searching program having return value that able to provide output like this:
    Found Names: ... Similarity Score: ..% Path: ...
    and the code like this:
    Java Code:
    Public class SearchResult{
    public static String process(){
    String showResult=null;
    if (found!=0){
    showResult="Found Names: "+found+ " similarity Score : " +compare+" Path: "+file.getName();}
    return showResult;
    now i've a GUI where i am able to show that result in TextArea, but instead of TextArea i want to use Column,Row to show that output by calling method when i click "show" button.
    the Code for Table:
    Java Code:
    resultSet.setLayout(new BorderLayout());
      DefaultTableModel model= new DefaultTableModel();
            Vector<String> vCol = new Vector<String>();
            vCol.addElement("NAMES");       vCol.addElement("SIMILARITY");          vCol.addElement("FILE PATH"); 
            Vector<String> row;
       Vector<Vector> vRow=new Vector<Vector>();
                    model = new DefaultTableModel(vRow, vCol); 
                    JTable table = new JTable(model);
                    JScrollPane     scrollpane = new JScrollPane(table);
    resultSet.add(scrollpane, BorderLayout.CENTER);
    so anybody pls help to figure out how can i add & fill each row by calling from 'SearchResult' class ??
    Last edited by doha786; 03-10-2010 at 09:20 AM.
    what we are thinking, it might not be true

Similar Threads

  1. help w/ method calling
    By blueduiker in forum New To Java
    Replies: 2
    Last Post: 01-12-2010, 08:55 AM
  2. Calling a method
    By mnki23 in forum New To Java
    Replies: 21
    Last Post: 11-06-2009, 10:10 PM
  3. calling method from main method
    By bob_bee in forum New To Java
    Replies: 4
    Last Post: 10-02-2009, 05:30 PM
  4. Need help calling from a different method
    By Mayur in forum New To Java
    Replies: 6
    Last Post: 03-08-2009, 10:27 PM
  5. Replies: 29
    Last Post: 09-25-2008, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts