Home > Articles > Programming > Java

Like this article? We recommend

Like this article? We recommend

Playing with Columns

When a table component is first displayed, all columns are given the same width and automatically fill a table component's entire width. All column widths change appropriately as a user resizes the window containing a table component. A user can also resize a column by moving the mouse pointer over the narrow separator line that appears on either side of the column's header cell. (The mouse pointer's shape changes to a left-right arrow shape to indicate that resizing is in effect.) The user then presses the left mouse button and drags the mouse (in an appropriate direction) to resize the column. Figure 4 illustrates a table component with all columns having the same width just before the user decides to change a column's width.

Figure 4 The user has the option to resize column E or column F.

When a column is resized, other column widths must change so that a table component's width remains the same. JTable provides several ways to accomplish that task. By default, the widths of all columns that are to the right of the column being resized (assuming that the mouse is being dragged to the right) have their widths adjusted so that the overall table component width remains the same. (The widths of columns to the left of the column being resized are not affected unless the mouse is being dragged to the left, in which case only the column immediately to the left of the column being resized is affected—in addition to the columns to the right.) You can specify the auto resize mode for a table component by calling JTable's setAutoResizeMode(int mode) method with one of JTable's auto resize constants described in Table 4.

Table 4 JTable Auto Resize Constants

Constant

Description

AUTO_RESIZE_ALL_COLUMNS

Proportionally adjusts all column widths during a resize operation.

AUTO_RESIZE_LAST_COLUMN

Adjusts only the last column's width during a resize operation.

AUTO_RESIZE_NEXT_COLUMN

Adjusts only the width of the column to the right (or left, depending on the direction that the mouse is dragged) of the column being resized.

AUTO_RESIZE_OFF

Does not automatically adjust column widths. Displays a horizontal scrollbar instead.

AUTO_RESIZE_SUBSEQUENT_COLUMNS

Proportionally adjusts the widths of all columns to the right of the column being resized (and possibly the column immediately to the left, depending on the direction that the mouse is dragged). That is the default behavior.


To experiment with column resizing, compile Listing 4's source code to the TableDemo4 application and run the resulting program.

Listing 4: TableDemo4.java

// TableDemo4.java

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.table.DefaultTableModel;

class TableDemo4 extends JFrame implements ActionListener
{
  JTable jt;

  TableDemo4 (String title)
  {
   // Pass the title to the JFrame superclass so that it appears in
   // the title bar.

   super (title);

   // Tell the program to exit when the user either selects Close
   // from the System menu or presses an appropriate X button on the
   // title bar.

   setDefaultCloseOperation (EXIT_ON_CLOSE);

   // Create a table with a default table model that specifies 10
   // rows by 10 columns dimensions.

   jt = new JTable (new DefaultTableModel (10, 10));

   // Assign column identifiers (headers) to the columns.

   String [] columnIDs =
   {
     "A", "B", "C", "D", "E", "F", "G", "H", "I", "J"
   };

   ((DefaultTableModel) 
   jt.getModel ()).setColumnIdentifiers (columnIDs);

   // Place the table in a JScrollPane object (to allow the table to
   // be vertically scrolled and display scrollbars, as necessary).

   JScrollPane jsp = new JScrollPane (jt);

   // Add the JScrollPane object to the frame window's content pane.
   // That allows the table to be displayed within a displayed 
   // scroll pane. It also allows the table's column headers to be
   // displayed.

   getContentPane ().add (jsp);

   // Create a panel for positioning buttons.

   JPanel jp = new JPanel ();

   // Create an "All Columns" button, register the current TableDemo4
   // object as a listener to that button's action events, and add
   // that button to the panel.

   JButton jb = new JButton ("All Columns");
   jb.addActionListener (this);
   jp.add (jb);

   // Create a "Last Column" button, register the current TableDemo4
   // object as a listener to that button's action events, and add
   // that button to the panel.

   jb = new JButton ("Last Column");
   jb.addActionListener (this);
   jp.add (jb);

   // Create a "Next Column" button, register the current TableDemo4
   // object as a listener to that button's action events, and add
   // that button to the panel.

   jb = new JButton ("Next Column");
   jb.addActionListener (this);
   jp.add (jb);

   // Create an "Off" button, register the current TableDemo4 object
   // as a listener to that button's action events, and add that
   // button to the panel.

   jb = new JButton ("Off");
   jb.addActionListener (this);
   jp.add (jb);

   // Create a "Subsequent Columns" button, register the current
   // TableDemo4 object as a listener to that button's action
   // events, and add that button to the panel.

   jb = new JButton ("Subsequent Columns");
   jb.addActionListener (this);
   jp.add (jb);

   // Add the panel to the south portion of the frame window's
   // content pane.

   getContentPane ().add (jp, BorderLayout.SOUTH);

   // Establish the frame's initial size as 600x250 pixels.

   setSize (600, 250);

   // Display the frame window and all contained components.

   setVisible (true);
  }

  public void actionPerformed (ActionEvent e)
  {
   // Identify the button that initiated the event.

   JButton jb = (JButton) e.getSource ();

   // Obtain the button's label.

   String label = jb.getText ();

   // Select appropriate resize mode.

   if (label.equals ("All Columns"))
     jt.setAutoResizeMode (JTable.AUTO_RESIZE_ALL_COLUMNS);
   else
   if (label.equals ("Last Column"))
     jt.setAutoResizeMode (JTable.AUTO_RESIZE_LAST_COLUMN);
   else
   if (label.equals ("Next Column"))
     jt.setAutoResizeMode (JTable.AUTO_RESIZE_NEXT_COLUMN);
   else
   if (label.equals ("Off"))
     jt.setAutoResizeMode (JTable.AUTO_RESIZE_OFF);
   else
     jt.setAutoResizeMode (JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);
  }

  public static void main (String [] args)
  {
   // Create a TableDemo4 object, which creates the GUI.

   new TableDemo4 ("Table Demo #4");
  }
}

In addition to setAutoResizeMode(int mode), JTable declares a getAutoResizeMode() method that you can call to obtain the current auto resize mode. Also, JTable declares a doLayout() method that a container's layout manager calls to lay out all columns in a table component. The doLayout() method uses the current auto resize mode to help it determine how to size columns.

If you position the mouse pointer over a column's header cell and press the left mouse button, you can drag that column to another location in the table component. You can also accomplish that task programmatically by calling JTable's moveColumn(int columnIndex, int newColumnIndex) method. Figure 5 demonstrates the use of moveColumn(int columnIndex, int newColumnIndex) to swap the leftmost and next-to-leftmost columns.

Figure 5 The leftmost and next-to-leftmost columns are swapped by calling jt.moveColumn (0, 1); (assuming that jt references a JTable object).

To examine the source code to Figure 5's TableDemo5 application, check out Listing 5.

Listing 5: TableDemo5.java

// TableDemo5.java

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.table.DefaultTableModel;

class TableDemo5 extends JFrame implements ActionListener
{
  JTable jt;

  TableDemo5 (String title)
  {
   // Pass the title to the JFrame superclass so that it appears in
   // the title bar.

   super (title);

   // Tell the program to exit when the user either selects Close
   // from the System menu or presses an appropriate X button on the
   // title bar.

   setDefaultCloseOperation (EXIT_ON_CLOSE);

   // Create a default table model consisting of 4 rows by 2 
   // columns.

   DefaultTableModel dtm = new DefaultTableModel (4, 2);

   // Assign column identifiers (headers) to the columns.

   String [] columnTitles =
   {
     "Name",
     "Address",
   };

   dtm.setColumnIdentifiers (columnTitles);

   // Populate all cells in the default table model.

   String [] names =
   {
     "John Doe",
     "Jane Smith",
     "Jack Jones",
     "Paul Finch"
   };

   String [] addresses =
   {
     "200 Fox Street",
     "Apt. 555",
     "Box 9000",
     "1888 Apple Avenue"
   };

   int nrows = dtm.getRowCount ();

   for (int i = 0; i < nrows; i++)
   {
      dtm.setValueAt (names [i], i, 0);
      dtm.setValueAt (addresses [i], i, 1);
   }

   // Create a table using the previously created default table
   // model.

   jt = new JTable (dtm);

   // Place the table in a JScrollPane object (to allow the table to
   // be vertically scrolled and display scrollbars, as necessary).

   JScrollPane jsp = new JScrollPane (jt);

   // Add the JScrollPane object to the frame window's content pane.
   // That allows the table to be displayed within a displayed
   // scroll pane.

   getContentPane ().add (jsp);

   // Create a panel for positioning buttons.

   JPanel jp = new JPanel ();

   // Create a "Swap" button, register the current TableDemo8 object
   // as a listener to that button's action events, and add that
   // button to the panel.

   JButton jb = new JButton ("Swap");
   jb.addActionListener (this);
   jp.add (jb);

   // Add the panel to the south portion of the frame window's
   // content pane.

   getContentPane ().add (jp, BorderLayout.SOUTH);

   // Establish the overall size of the frame window to 400
   // horizontal pixels by 150 vertical pixels.

   setSize (400, 150);

   // Display the frame window and all contained
   // components/containers.

   setVisible (true);
  }

  public void actionPerformed (ActionEvent e)
  {
   // Swap columns 0 and 1.

   jt.moveColumn (0, 1);
  }

  public static void main (String [] args)
  {
   // Create a TableDemo5 object, which creates the GUI.

   new TableDemo5 ("Table Demo #5");
  }
}

Column Models

If you were to examine the source code to JTable's moveColumn(int columnIndex, int newColumnIndex) method, you would find the following method call: getColumnModel ().moveColumn (columnIndex, newColumnIndex). (I've changed the names of the arguments, to be consistent with my choices of argument names.) That method call suggests something called a column model.

In addition to a model, a table component contains a column model. The column model manages each column of cells that a UI delegate displays. Column models are created from classes that directly or indirectly, by way of a superclass, implement the TableColumnModel interface. JTable provides a setColumnModel(TableColumnModel m) method that its constructors call to establish the column model. JTable also provides a getColumnModel() method that returns a TableColumnModel reference to the current column model. To properly implement TableColumnModel, classes provide implementations for those methods described in Table 5.

Table 5 TableColumnModel Methods

Method

Description

addColumn(TableColumn tc)

Appends the TableColumn object referenced by tc to the end of an array of TableColumn objects. Also, calls all listeners' columnAdded(TableColumnModelEvent e) methods.

addColumnModelListener(TableColumnModelListener l)

Adds the listener referenced by l to the column model's array of listeners. When a change is made to the column model, those listeners are notified.

getColumn(int columnIndex)

Returns a reference to the TableColumn object located at columnIndex.

getColumnCount()

Returns an integer that contains the number of columns managed by the column model.

getColumnIndex(Object columnID)

Returns an integer that contains the index of the first column whose column identifier matches columnID.

getColumnIndexAtX(int xPosition)

Returns an integer that contains the index of the column at xPosition or -1 if no column is located at xPosition.

getColumnMargin()

Returns an integer that contains the number of pixels between cells in a column.

getColumns()

Returns an Enumeration of all TableColumn objects managed by the column model.

getColumnSelectionAllowed()

Returns a Boolean true value if columns can be selected.

getSelectedColumnCount()

Returns an integer that identifies the number of selected columns—0, if no columns have been selected.

getSelectedColumns()

Returns an integer array of column indexes for all selected columns. The array has 0 length if no columns have been selected.

getSelectionModel()

Returns a reference to a ListSelectionModel object that maintains the table component's selection state.

getTotalColumnWidth()

Returns an integer containing the total width (in pixels) of all columns.

moveColumn(int columnIndex, int newIndex)

Moves the column (and its header cell) from columnIndex to newIndex. Also, calls all listeners' columnMoved(TableColumnModelEvent e) methods.

removeColumn(TableColumn tc)

Removes the TableColumn object referenced by tc from the array of TableColumn objects. Also, calls all listeners' columnRemoved(TableColumnModelEvent e) methods.

removeColumnModelListener(TableColumnModelListener l)

Removes the listener referenced by l from the column model's array of listeners.

setColumnMargin(int newMargin)

Sets all TableColumn margins to newMargin pixels. Also, calls all listeners' columnMarginChanged(ChangeEvent e) methods.

setColumnSelectionAllowed(boolean isSelect)

Allows columns to be selected if isSelect is true.

setSelectionModel(ListSelectionModel m)

Sets the column's selection model to the object referenced by m.


Unlike data models, you don't normally create your own column models. Instead, JTable creates a column model on your behalf. It creates that column model from the DefaultTableColumnModel class (which implements the TableColumnModel interface).

TableColumnModel's methods are called by your programs, by various parts of the table component, or by both. As you can see, some of the methods refer to the TableColumn class. That class gives you the ability to customize individual columns. For example, you can determine the appearance of some or all cells in a column by specifying a renderer for that column. (You will learn how to do that a bit later in this article.)

One important capability that TableColumnModel provides you with is column model listener registration. You can register a listener with the column model to respond to various events by calling the addColumnModelListener(TableColumnModelListener l) method. When certain column model methods are called, various methods declared by your listener will be called in response. For example, when a column model's moveColumn(int columnIndex, int newIndex) method is called, each listener's columnMoved(TableColumnModelEvent e) method is called by the column model to alert that listener to the fact that a column has moved.

Enough theory! Listing 6 presents source code to the TableDemo6 application. That source code demonstrates the creation of TableColumn objects, adding those objects to the column model, removing TableColumn objects from the model, changing column margins, registering a column model listener, and listening to most of the column model events.

Listing 6: TableDemo6.java

// TableDemo6.java

import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;

class TableDemo6 extends JFrame implements ActionListener,
                      TableColumnModelListener
{
  JTable jt;

  TableDemo6 (String title)
  {
   // Pass the title to the JFrame superclass so that it appears in
   // the title bar.

   super (title);

   // Tell the program to exit when the user either selects Close
   // from the System menu or presses an appropriate X button on the
   // title bar.

   setDefaultCloseOperation (EXIT_ON_CLOSE);

   // Create a default table model consisting of 4 rows by 2 
   // columns.

   DefaultTableModel dtm = new DefaultTableModel (4, 2);

   // Assign column identifiers (headers) to the columns.

   String [] columnTitles =
   {
     "Name",
     "Address",
   };

   dtm.setColumnIdentifiers (columnTitles);

   // Populate all cells in the default table model.

   String [] names =
   {
     "John Doe",
     "Jane Smith",
     "Jack Jones",
     "Paul Finch"
   };

   String [] addresses =
   {
     "200 Fox Street",
     "Apt. 555",
     "Box 9000",
     "1888 Apple Avenue"
   };

   int nrows = dtm.getRowCount ();

   for (int i = 0; i < nrows; i++)
   {
      dtm.setValueAt (names [i], i, 0);
      dtm.setValueAt (addresses [i], i, 1);
   }

   // Create a table using the previously created default table
   // model.

   jt = new JTable (dtm);

   // Register the current TableDemo6 object as a listener for table
   // column model events.

   jt.getColumnModel ().addColumnModelListener (this);

   // Place the table in a JScrollPane object (to allow the table to
   // be vertically scrolled and display scrollbars, as necessary).

   JScrollPane jsp = new JScrollPane (jt);

   // Add the JScrollPane object to the frame window's content pane.
   // That allows the table to be displayed within a displayed
   // scroll pane.

   getContentPane ().add (jsp);

   // Create a panel for positioning buttons.

   JPanel jp = new JPanel ();

   // Create an "Add" button, register the current TableDemo6 object
   // as a listener to that button's action events, and add that
   // button to the panel.

   JButton jb = new JButton ("Add");
   jb.addActionListener (this);
   jp.add (jb);

   // Create a "Remove" button, register the current TableDemo6
   // object as a listener to that button's action events, and add
   // that button to the panel.

   jb = new JButton ("Remove");
   jb.addActionListener (this);
   jp.add (jb);

   // Create a "Change Margin" button, register the current
   // TableDemo6 object as a listener to that button's action
   // events, and add that button to the panel.

   jb = new JButton ("Change Margin");
   jb.addActionListener (this);
   jp.add (jb);

   // Add the panel to the south portion of the frame window's
   // content pane.

   getContentPane ().add (jp, BorderLayout.SOUTH);

   // Establish the overall size of the frame window to 400
   // horizontal pixels by 175 vertical pixels.

   setSize (400, 175);

   // Display the frame window and all contained
   // components/containers.

   setVisible (true);
  }

  public void actionPerformed (ActionEvent e)
  {
   // Identify the button that initiated the event.

   JButton jb = (JButton) e.getSource ();

   // Obtain the button's label.

   String label = jb.getText ();

   if (label.equals ("Add"))
   {
     // Create a new column.

     TableColumn tc = new TableColumn ();

     // Set the column's header to Extra.

     tc.setHeaderValue ("Extra");

     // Add the column to the end of the columns managed by the
     // column model.

     jt.addColumn (tc);
   }
   else
   if (label.equals ("Remove"))
   {
     // If there is at least one column ...

     if (jt.getColumnModel ().getColumnCount () != 0)
     {
       // Retrieve leftmost column.

       TableColumn tc = jt.getColumnModel ().getColumn (0);

       // Remove that column.

       jt.removeColumn (tc);
     }
   }
   else
   {
     // Get the column model.

     TableColumnModel tcm = jt.getColumnModel ();

     // Change the margin that surrounds a column's cell values
     // and the grid lines.

     tcm.setColumnMargin ((int) (Math.random () * 30));
   }
  }

  public void columnAdded (TableColumnModelEvent e)
  {
   System.out.println ("Column added");
  }

  public void columnMarginChanged (ChangeEvent e)
  {
   System.out.println ("Column margin changed");
  }

  public void columnMoved (TableColumnModelEvent e)
  {
   // Not needed (but must implement).
  }

  public void columnRemoved (TableColumnModelEvent e)
  {
   System.out.println ("Column removed");
  }

  public void columnSelectionChanged (ListSelectionEvent e)
  {
   System.out.println ("Selection changed");
  }

  public static void main (String [] args)
  {
   // Create a TableDemo6 object, which creates the GUI.

   new TableDemo6 ("Table Demo #6");
  }
}

Compile the TableDemo6 source code and run the resulting program. Press the Add button, and you should notice the addition of an extra column, as Figure 6 illustrates.

Figure 6 Clicking the Add button results in a new column (and a surprise).

There is something strange about Figure 6. Notice that the new column's cell values duplicate the leftmost column's cell values? How did that happen? The answer is actually quite simple.

As you probably know by now, you can drag a table component's columns with the mouse. Somehow, the column's cell values accompany the column to its new position. To make that happen, the TableColumn class includes a protected modelIndex field that links the column in the column model to the column of cells stored in the model. That modelIndex field is initialized during the creation of the TableColumn object and remains the same (unless you call TableColumn's setModelIndex(int modelIndex) method) throughout the life of the TableColumn object. Just before a cell is rendered, JTable's prepareRenderer(TableCellRenderer renderer, int rowIndex, int columnIndex) method calls JTable's getValueAt(int rowIndex, int columnIndex) method. That method executes return getModel().getValueAt(rowIndex, convertColumnIndexToModel(columnIndex)); to retrieve the value of the cell about to be rendered. If you look at JTable's convertColumnIndexToModel(int viewColumnIndex) method, you will find the following code fragment: return getColumnModel().getColumn(viewColumnIndex).getModelIndex();. As you can see, the value of the TableColumn's modelIndex field is retrieved. If you could see that return value, you would notice that it is 0. Basically, the leftmost and the new rightmost column share the same model index.

How is it possible that both the leftmost and rightmost columns share the same modelIndex? The answer lies in the TableColumn() constructor. That constructor assigns 0 to modelIndex. And that value was also used to identify the leftmost column in the model when the JTable object was created.

NOTE

TableDemo6 calls JTable's addColumn(TableColumn tc) and removeColumn(TableColumn tc) methods to add and remove columns. If you were to look at the source code for those methods, you would discover that they call getColumnModel() followed by calls to the column model's addColumn(TableColumn tc) and removeColumn(TableColumn tc) methods. In a sense, you can think of JTable's addColumn(TableColumn tc), removeColumn(TableColumn tc), and getValueAt(rowIndex, columnIndex) methods as convenience methods that wrap themselves around calls to equivalent methods in the table component's model and column model. Apart from removeColumn(TableColumn tc) (which is a convenience method), the other two methods perform various tasks behind the scenes. They are more than just convenience methods. Understanding that will help you realize why methods are duplicated in different places.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020