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).
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]);
}
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.
How can i send array of values from one frame to another frame
Thank you.
Quote:
How can i send array of values from one frame to another frame?