View Single Post
Old 08-22-2008, 10:20 PM   PM User | #1
Inquisit
New Coder

 
Join Date: Aug 2008
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Inquisit is an unknown quantity at this point
Question How to call a j-frame from a main frame (frame to frame)

Question to the experts
I use both Netbeans 5.5 and Forte for java 4

how to call a j-frame from a main j-frame (frame to frame)



i have created a main J-frame and 8 sub j-frames in one class (package)
i find this as a conservative method and time efficient rather than individual java files for these are not internal frames but are regular frames

ive tried some methods to solve this either i get an error the whole window dissapears or nothing happens

in the Main J-frame there are buttons that you click to go to the next J-frame the same way "a-href" in HTML works in the same window and back

Lets say my project is a Finance project


i.e

Main J-Frame *****Contents

Menu:- ( TVM) ----------> button // opens TVM J-frame (J-Frame 2)

(Compound interest)------> button //Opens Compound Interest j-frame 3
etc

when you click the ---------> (TVM) button
it should open the TVM J-frame (J-frame in the same window) frame 2
this also applies when you click----> (Compound interest) opens J-frame 3
while the 2nd or 3rd frame is shown the main frame should be invisible
either this.dispose or HIDE_ON_CLOSE

while using action performed or mouse clicked to be assigned to a button
(action listeners) you get a message

i.e
public void actionPerformed(ActionEvent e)

//add your handling code here

now what code is to be placed here in order to achieve this
calling a j-frame (frame to frame)

Your help on this one

thanks
Inquisit is offline   Reply With Quote