一个java程序它的里边有一个new 方法,new 的是另一个java类里的方法,这样的程序如何运行??
比如:下面这个,它的上机_actionperformed方法中有jpanel1这个类,象这个如何运行??
public class JFrame1 extends JFrame {
public JFrame1() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
public void 上机_actionPerformed(ActionEvent e) {
JPanel1 objJPanel=new JPanel1();
this.remove(this.getContentPane());
this.setContentPane(objJPanel);
this.setVisible(true); }
比如:下面这个,它的上机_actionperformed方法中有jpanel1这个类,象这个如何运行??
public class JFrame1 extends JFrame {
public JFrame1() {
try {
setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
public void 上机_actionPerformed(ActionEvent e) {
JPanel1 objJPanel=new JPanel1();
this.remove(this.getContentPane());
this.setContentPane(objJPanel);
this.setVisible(true); }
非法字符,它找不到另一个类,因为这是两个java程序
非法字符,它找不到另一个类,因为这是两个java程序楼上的明白了吗??