opening a jframe using a button

I

iszekeell

Ok, I believe you are going to find this simple,
Right well I'm useing netbeans and i have created two separate
jframes, I have them in the same package, and I want to call/open/view
jframe2 by pressing a button on jframe1.
Any help will be greatly welcome.
Thanks in advance.
 
F

Faton Berisha

Ok, I believe you are going to find this simple,
Right well I'm useing netbeans and i have created two separate
jframes, I have them in the same package, and I want to call/open/view
jframe2 by pressing a button on jframe1.
Any help will be greatly welcome.
Thanks in advance.

Insert into the button's action listener (usually a method called
actionPerformed) a line like

jframe2.setVisible(true);

Faton Berisha
 
I

iszekeell

thanks work a treat
sorry for not replying sooner, didn't think i got the post up
thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,591
Members
45,102
Latest member
GregoryGri
Top