Hi, i want to call frame B from Frame A

 private void BFrameBActionPerformed(java.awt.event.ActionEvent evt) {
Frame B = new Frame
B.setVisible(true);
}

NOTE :calling JframeB is trigerred by a jButton
but when I do this FrameA overlays my Frame B. can someone help me with this?

Recommended Answers

All 3 Replies

You could try calling requestFocus for window B to bring it to the front. Details are in the API doc as always.

should work perfectly. but I would advice to use JFrame's instead of Frame's.

@stultuske :D you are right it does work. I wonder why it looks like that earlier when it's ok now .. but anyway thank you for all the reply :))

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.