have various classes representing various types of program-genres (comedy, drama etc).

I have a text file filled with '-' seperated values that get read by a class called Processing and puts them into a LinkedList.

I have another class GUI_g that creates the GUI. It has 3 JTables. One for the list and 1 for each Channel. (Channel 1 and Channel 2). The JTable listTable gets filled from the linkedlist and whenever a user clicks on a row, the textfields' text changes accordingly.

I tried with 3 fields (Title, Genre and Duration) and it worked, with the 3 textfields showing different text according to what row is clicked. However when I added all the needed values, an error comes up and no fields are filled.

I have two problems:

  1. If it's a MusicVideo the cells are not filled up (as it should be) however it returns an error when copying data to the JTextFields
  2. The Snyopsis column remains empty and is not filled.

Below are the classes (the ones mainly used). If you need others tell me and I'll upload.

GUI_g: http://pastebin.com/LXeXK7q6
ProgramTableModel: http://pastebin.com/VNaXp4Cv
Processing: http://pastebin.com/HdJNaQvA
Program: http://pastebin.com/KT2TtDDU

This is the error I get:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

JTable mouseListener:

listTable.addMouseListener(new MouseAdapter() {

                 public void mouseClicked(MouseEvent e) {
                    if (e.getClickCount() == 1) {
                  JTable target = (JTable)e.getSource();
                  int row = target.getSelectedRow();
                  int column = target.getSelectedColumn();

                  String title = listTable.getValueAt(row, column).toString();
                  String duration = listTable.getValueAt(row, column+1).toString();
                  String genre = listTable.getValueAt(row, column+2).toString();
                  String actor = listTable.getValueAt(row, column+3).toString();
                  String director = listTable.getValueAt(row, column+4).toString();
                  //String rentable = listTable.getValueAt(row, column+5).toString();
                  //String synopsis = listTable.getValueAt(row, column+6).toString();


                  if (listTable.getValueAt(row, column+3) == null) {

                      listTable.setValueAt("N/A", row, column+3);


                  else {


                  if (listTable.getValueAt(row, column+4) == null) {

                      listTable.setValueAt("N/A", row, column+4);

                  } else {



This is the project: http://www.mediafire.com/?0vjdw2t6762226t

Any help please?


This error simply means you havnt initialized object. Paste the complete error message so we can clear your problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.