簡體   English   中英

將DesignGridLayout添加到我的注冊表單時出現錯誤。 請在這件事上給予我幫助

[英]I am getting an error, while adding DesignGridLayout to my register form. Please help me with this

我的問題是我們是否必須將Designgridlayout包或其他內容導入程序才能使用DesignGridLayout? 還是由於其他原因導致的錯誤? 如果是,我在哪里可以得到軟件包,以及在哪里安裝(哪個目錄)。 我目前正在使用jdk 1.7,並且我的程序使用記事本。 我是初學者。 請幫忙。 我的代碼如下所示。

Register.addActionListener(new ActionListener()

{

public void actionPerformed(ActionEvent ae)

    {

    JIF1.setVisible(true);
    }
}); 
    JIF1 = new JInternalFrame("Register",true,true, true, true);

    JIF1.setBounds(25, 25, 400, 300); 

    C1 = JIF1.getContentPane();
DesignGridLayout layout = new DesignGridLayout();
C1.setLayout(layout);

layout.row().grid(i1l1).add(i1t1);

我得到的錯誤是錯誤:

cannot find symbol
DesignGridLayout = new DesignGridLayout();
Symbol: Class: DesignGridLayout
location: class a

新錯誤圖片 在此處輸入圖片說明

DesignGridLayout是非標准的布局管理器。 如果您在類路徑上有jar文件 ,則可以添加

import net.java.dev.designgridlayout.DesignGridLayout;

只要您在編譯和運行時指定jar文件的位置,jar文件的位置就沒有關系

但是,使用IDE將使指定JAR文件的類路徑變得容易得多。

您導入了揮桿課程嗎?

import javax.swing.*;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM