JTable with titled rows and columns?

I think that you searching RowTable import java.awt. *; import java.awt.event. ActionEvent; import javax.swing.

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

*; public class JTableRowHeader { private JFrame frame = new JFrame("JTable RowHeader"); private JScrollPane scrollPane; private JTable table; private DefaultTableModel model; private TableRowSorter sorter; private JTable headerTable; public JTableRowHeader() { table = new JTable(4, 4); for (int I = 0; I Class; default: return super. GetColumnClass(colNum); } } }; headerTable = new JTable(model); for (int I = 0; I filter = new RowFilter() { @Override public boolean include(javax.swing.RowFilter. Entry entry) { return ((Number) entry.

GetValue(0)).intValue() % 2 == 0; } }; @Override public void actionPerformed(ActionEvent e) { if (sorter.getRowFilter()! = null) { sorter. SetRowFilter(null); } else { sorter.

SetRowFilter(filter); } } }), BorderLayout. SOUTH); frame.pack(); frame. SetLocation(150, 150); frame.

SetVisible(true); } public static void main(String args) { try {// UIManager. SetLookAndFeel(UIManager. GetSystemLookAndFeelClassName()); for (LookAndFeelInfo info : UIManager.

GetInstalledLookAndFeels()) { if (info.getName(). Equals("Nimbus")) { UIManager. SetLookAndFeel(info.getClassName()); break; } } } catch (Exception e) { //e.printStackTrace(); } EventQueue.

InvokeLater(new Runnable() { @Override public void run() { JTableRowHeader TestTableRowHeader = new JTableRowHeader(); } }); } }.

But my code is pre-school compare with @camickrs tips4java.wordpress.com/2008/11/18/row-n... – mKorbel Nov 18 '11 at 19:14 Nice. I figured this question would be up your alley. – Hovercraft Full Of Eels Nov 18 '11 at 19:21 1 +1 for using a row header.

– camickr Nov 18 '11 at 21:10.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions