Show JFrame

hi to all

i have a question to ask how can i display a JFrame when a button is clicked. and plz give me code. further i m using Netbeanx 5.5 which is a visual tool. and plz give me answer acc, to netbeans environment.

i explain u complete senario. i have a JFrame which is been created when i create a new project. now i add annother JFrame so another JFrame is created. Now here in first JFrame class i have a button and in its clicked event i have to show second JFrame. now plz give me solution of it

[522 byte] By [Hassan_GuGua] at [2007-11-27 5:05:07]
# 1

Example:

myButton.addActionListener(this);

...

public void actionPerformed(ActionEvent e) {

myJFrame.setVisible(true);

}

ktm5124a at 2007-7-12 10:23:32 > top of Java-index,Desktop,Core GUI APIs...