Need Help On Function!

Hello, im just a beginner in java and sorry if this problem will look so weird. I wanted to link 2 java file, for example me and my friend had come out with 2 seperate java file (a.java & b.java). a.java is the main file where it load all the frame and button and b.java is another type of program that have another window and function. Is it possible to link b.java by using the button, mean that by a click of the button in a.java the b.java window will run on top of it. need help on this matter. tq

[513 byte] By [river_mushkah] at [2007-9-30 18:31:28]
# 1
Can u show the code for a.java, and b.java, bcoz unless seeing the code this might be a problem. But seeing ur description it looks possible. Let me know.Thanks
sunny08 at 2007-7-6 20:35:29 > top of Java-index,Administration Tools,Sun Connection...
# 2

Oh.. tq very much, this is the example the code.

import java.applet.*;

import java.awt.*;

import java.awt.event.*;

Public class ButtonEvents extend Applet implements ActionListener {

Label label;

Public void init(){

Button b1 = new Button("b.java");

b1.addActionListener(this);

add(b1);

}

public void actionPerformed(ActionEvent ae){

-> in here suppose when user click the button it link to another set of java file that have the same format of this file (b.java)

}

}

river_mushkah at 2007-7-6 20:35:29 > top of Java-index,Administration Tools,Sun Connection...
# 3

by the way, this is the link to my webpage. All of the code that i need to link each other is inside it.

http://www.geocities.com/angularoza/

i've wanted to link MatrixCalculator.java with GElim.java under MatrixCalculator applet button.Once the user click Row Echelon button inside MatrixCalculator.java it will open GElim.java new window screen

tq.

p/s: those 2 file is my best reference for me to create my own complete matrix calculator program.

river_mushkah at 2007-7-6 20:35:29 > top of Java-index,Administration Tools,Sun Connection...
# 4
anyone....plz...need your help.....
river_mushkah at 2007-7-6 20:35:29 > top of Java-index,Administration Tools,Sun Connection...
# 5

You do not link 2 .java files together; you link the .class files.

Follow the following steps:

1. In MatrixCalculator.java comment line number 12,13,14 & 15, so that the function init() is totally commented.

2. also comment linenumber 128 "gelim.initComponents();"

3. insert a line here "gelim.show();"

That is all.

ALL THE BEST

kapilChhabra

ps. put a cap on the textbox next to the "setup" button in GElim.java. a big value such as 100, can crash you r application

kapilChhabra at 2007-7-6 20:35:29 > top of Java-index,Administration Tools,Sun Connection...
# 6
make sure you have compile both the programs in the same directory. ie all the class files should be kept together.
kapilChhabra at 2007-7-6 20:35:29 > top of Java-index,Administration Tools,Sun Connection...