gui.CataloguePanel.(CataloguePanel.java) 处的线程“主”java.lang.NullPointerException 中的异常
我正在尝试初始化一个BookQuery
对象CataloguePanel
并调用getBookList()
CataloguePanel.java
package gui;
import java.util.ArrayList;
import backend.Book;
import backend.BookQuery;
// Catalog panel. Shows the library titles' information and allows users to place their orders.
public class CataloguePanel extends JPanel implements GBPanel {
BookQuery bQuery;
ArrayList<Book> bookList = bQuery.getBookList(); // Here's where the error occurred
}
编辑: http ://www.reactionface.info/sites/default/files/imagecache/Node_Page/images/1314029819767.png