• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Rexhaul Cartier
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im using Forte for Java4 and NetBeans 5.5
my biggest obstacle is calling a sub j-frames from the main j-frame

i have created a main J-frame and various sub j-frames in one
class( package)

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


my project is a financial program



i.e

Main Frame

Menu:- ( TVM) ----------> button

(simple interest)-------> button


etc


when you click the (TVM) button
it should open the TVM frame (subframe(J-frame 2 in the same window))
with its contents this applies to the rest back and forth




I have also posted this on other site by having a more flexible opinion by experts how to overcome this
any suggestions?

your help would be appreciated
thanks
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

Sounds like something for the Swing forum, so I shall move you there. Thank you for telling us you are on another site as well; let's see if JavaRanch can't give you an answer sooner.

You don't open two Frames inside each other; you add a Component to the "parent" frame, which I think is called a JDesktopPane, then you open JInternalFrames or similar inside it. There is something in the Java Tutorials about that: here.

It is quite easy to open a second Frame from a button or a menu item by adding an ActionListener to it, but I am not convinced that is what you want.

Good luck, and you are now off to the Swing forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!