允许访问另一个框架

时间:2018-08-28 01:52:59

标签: java netbeans jframe

如果我删除其中一个权限,则将显示GUI,但是如果我添加了这两个权限,则GUI将不会显示,并且出现此错误:

  

线程“ AWT-EventQueue-0”中的异常java.lang.InternalError:当前进程已将其所有系统允许的句柄用于Window Manager对象。

我有一个名为FMenuMasterAgama的jframe来打开FCariMasterAgama,FCariMasterAgama要访问FMenuMasterAgama上的表 这是我在FMenuMasterAgama上的代码:

public class FMenuMasterAgama extends javax.swing.JFrame {
koneksi konek;
Connection conn=null;
Statement stmt= null;
ResultSet rs = null;
FUbahMasterAgama ubahmasteragama;
FMasterAgama tambahagama;
FCariMasterAgama carimaster;
PreparedStatement pst = null;
/**
 * Creates new form FMenuMasterNegara
 */
public FMenuMasterAgama() {
    initComponents();
    konek = new koneksi();
    ubahmasteragama = new FUbahMasterAgama();
    tambahagama = new FMasterAgama();
    carimaster = new FCariMasterAgama();
    loadtable();

}

这是我来自FCariMasterAgama的代码:

public class FCariMasterAgama extends javax.swing.JFrame {
koneksi konek;
FMenuMasterAgama menu;
Statement stmt = null;
ResultSet rs = null;
/**
 * Creates new form FCariMasterAgama
 */
public FCariMasterAgama() {
    initComponents();
    konek = new koneksi();
    menu =  new FMenuMasterAgama();
    setDefaultCloseOperation(FCariMasterAgama.DISPOSE_ON_CLOSE);
    setLocationRelativeTo(null);
}

0 个答案:

没有答案