plz tell me that how we can call one frame window from another frame window

i think u can call the class of one frame window by creating an object in the other frame window....

eg... write a program to display a window which contains a button named "click here" n by clicking it another window ll get opened displaying "hai" message...

windowa.java

windowb.java

i hav attached the program for this...i think this ll help u.. refer to this..

Is your code working? If not, where are you having problems with?
Also I would suggest, next time, to use the javax.swing.* package (JFrame, JButton, ....)

I want to write java coding perfectly.
I am very interesting in writing program.
I want to use javax.swing.* package(JFrame ,JButton,.............)

Okay? And?

We've already seen that the open( ) method of the Window object returns a new Window object representing the newly created window. We've also seen that this new window has an opener property that refers back to the original window. In this way, the two windows can refer to each other, and each can read properties and invoke methods of the other. The same thing is possible with frames. Any frame in a window can refer to any other frame through the use of the frames, parent, and top properties of the Window object.

Every window has a frames property. This property refers to an array of Window objects, each of which represents a frame contained within the window. (If a window does not have any frames, the frames[] array is empty and frames.length is zero.) Thus, a window (or frame) can refer to its first subframe as frames[0], its second subframe as frames[1], and so on. Similarly, JavaScript code running in a window can refer to the third subframe of its second frame like this:

frames[1].frames[2]

Uhm, this is a Java forum. Was this meant to be a JavaScript question?

Java != JavaScript FYI BTW

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.