Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2011
    Location
    India,Tamil Nadu
    Posts
    32
    Rep Power
    0

    Smile How to pass the value(lift) from one page(SCL.java) to another page(MFCP.java)

    Hi,
    How to pass values from one page(SCL.java) to another page(MFCP.java)

    I created new file by
    selecting Swing GUI Forums in categories & JFrames in file types.
    May i know how to pass the "lift value" to another page (MFCP.java).

    Java Code:
    import javax.swing.*;
    import javax.swing.table.*;
    import java.sql.*;
    public class SCL extends javax.swing.JFrame {
    Object[] data 	= new Object[5];
    	 String s[]={"Count","Rule","Suport","Confidence","Lift"};
    	int num[]= new int[20];
            int number[]= new int[20];
             float f2[]= new float[20];
             float f3[]= new float[20];
            float f1[]= new float[20];
            String Rule[]={"FUP1- N","FUP1-Y","MUP1-N","MUP1-Y","FUP2-N","FUP2-Y","MUP2-N","MUP2-Y","FUP3-N","FUP3-Y","MUP3-N","MUP3-Y","FUP4-N","FUP4-Y","MUP4-N","MUP4-Y","FUP5-N","FUP5-Y","MUP5-N","MUP5-Y"};
            String sql[]=new String[60];
             int Supportnum;
    
    	int i,a,j,k,b,countnum,b1;
    
    
    
    
    	DefaultTableModel d 	= new DefaultTableModel();
    	JTable jtable1		= new  JTable(d);
    	JFrame frame = new JFrame();
    
    		{
    		setVisible(true);
    		setSize(400, 600);
    		setLocation(100, 100);
    		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    
    
    		for(int c = 0; c < 5; c++)
    		{
    			d.addColumn(s[c]);
    		}
    Java Code:
    for(j=20,k=0,countnum=1;j<=39&&k<=19&&countnum<=20;j++,k++,countnum++)
                            {
    			rs[j]=st1.executeQuery(sql[j]);
                            System.out.println("Inside for loop  "+j);
    				{
    
    					if (rs[j].next())
    					{
    					        number[k] = rs[j].getInt(1);
                                                    float x,y,z,lift,x1,x2,y1;
                                                   
                                                    x1=number[k];
                                                    x2=Supportnum;
                                                         x=x1/x2;
                                                    y1=num[k];
                                                        y=y1/x2;
                                                    z=(f1[k]/x2);
                                                   [COLOR="darkred"] lift=(x/(y*z));[/COLOR]                                                data[0]=countnum;
                                                    data[1]=Rule[k];
                                                    data[2]=number[k]+"/"+Supportnum;
    						data[3]=number[k]+"/"+num[k];
                                                    data[4]=lift;
    					}
                                            d.addRow(data);
    					rs[j].close();
    
            			}
    With Regards and Respects,
    Nandhini.
    Last edited by nandhinianand; 08-05-2011 at 09:02 AM.

  2. #2
    Tamasa is offline Member
    Join Date
    Aug 2011
    Posts
    7
    Rep Power
    0

  3. #3
    Join Date
    Jul 2011
    Location
    India,Tamil Nadu
    Posts
    32
    Rep Power
    0

    Smile How can i send array of values from one frame to another frame

    Thank you.

    How can i send array of values from one frame to another frame?
    Java Code:
    lift[k]=(x/(y*z));

Similar Threads

  1. How to Export web page(jsp page) to excel using jsp or servlets or javascript
    By techsing14 in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 05-25-2011, 12:08 PM
  2. Replies: 0
    Last Post: 04-27-2011, 11:34 AM
  3. Pass variable from program to web page
    By snoopy11 in forum New To Java
    Replies: 2
    Last Post: 03-13-2011, 05:10 PM
  4. Replies: 1
    Last Post: 08-22-2008, 07:28 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
  •