salve raga, sto facendo una specie di applicazione con JBuilder 9 ed ho creato 2 frame, vorrei sapere cosa devo mettere alla riga ""void clicca_actionPerformed(ActionEvent e)"" per fare in modo che il bottone clicca si collega al Frame2, credo sia facile ma cosa devo mettere!!!;

riporto il codice.

Frame 1:


package untitled1;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;

/**
*

Title:</p>
*

Description: </p>
*

Copyright: Copyright (c) 2005</p>
*

Company: </p>
* @author not attributable
* @version 1.0
*/

public class Frame1
extends JFrame {
JPanel contentPane;
JEditorPane Accedere = new JEditorPane();
JTextArea Login = new JTextArea();
JTextArea Password = new JTextArea();
JPasswordField CampoLogin = new JPasswordField();
JTextArea Sistema = new JTextArea();
JEditorPane Accesso = new JEditorPane();
JFormattedTextField CampoPassword = new JFormattedTextField();
JButton clicca = new JButton();
JTextPane centrale = new JTextPane();
JButton clicca1 = new JButton();

//Construct the frame
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}

//Component initialization
private void jbInit() throws Exception {
contentPane = (JPanel)this.getContentPane();
this.setForeground(Color.white);
....
.....
....
...

....
}

//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}

void clicca_actionPerformed(ActionEvent e) {


}

void clicca1_actionPerformed(ActionEvent e) {

}
}

class Frame1_clicca_actionAdapter
implements java.awt.event.ActionListener {
Frame1 adaptee;

Frame1_clicca_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}

public void actionPerformed(ActionEvent e) {
adaptee.clicca_actionPerformed(e);
}
}

class Frame1_clicca1_actionAdapter implements java.awt.event.ActionListener {
Frame1 adaptee;

Frame1_clicca1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.clicca1_actionPerformed(e);
}
}


frame2:

import com.borland.jbcl.layout.*;

/**
*

Title:</p>
*

Description: </p>
*

Copyright: Copyright (c) 2005</p>
*

Company: </p>
* @author not attributable
* @version 1.0
*/

public class Frame2
extends JFrame {
JPanel contentPane;
JEditorPane Scegli = new JEditorPane();
JTextArea Sistema = new JTextArea();
JTextArea Iscrizione = new JTextArea();
JTextArea Visualizza = new JTextArea();
JTextArea Visualizzac = new JTextArea();
JButton Cliccai = new JButton();
JButton CliccaV = new JButton();
JButton Cliccavc = new JButton();

//Construct the frame
public Frame2() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}

//Component initialization
private void jbInit() throws Exception {
contentPane = (JPanel)this.getContentPane();
............
...........
...........
.........
........
contentPane.add(Cliccai, null);
}

//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
}
}

void clicca_actionPerformed(ActionEvent e) {

}
}

class Frame2_clicca_actionAdapter
implements java.awt.event.ActionListener {
Frame2 adaptee;

Frame2_clicca_actionAdapter(Frame2 adaptee) {
this.adaptee = adaptee;
}

public void actionPerformed(ActionEvent e) {
adaptee.clicca_actionPerformed(e);
}
}



grazie a todos...