Re: Open new JPanel (JFrame, ...) by clicking JButton

On 2006-01-09, snuffie_456@xxxxxxxxx penned:
> Hello everybody,
> I'm writing a program in Java, in which I want to use more than one
> window. Can anyone tell me how I can open a new JPanel (or perhaps
> I'd better choose "extends JFrame"?) by clicking a JButton in the
> main program? eg. clicking on "Find" will open a "Find-window", in
> wich the user can type and do things (more than a regular aboutbox
> or so...) I am a newbie in Java and I've been searching for a whole
> day on something that maybe the most of you wil find ridiculous, but
> I really can't find or realise it...
> I hope someone can help me!
> Thanks in advance, Greetings, Tari

You'll need an ActionListener for the JButton. In that
ActionListener, you will need to create or show a new JFrame or

Have you gotten to the point of using ActionListeners yet?


Ask smart questions, get good answers: