public static JTable table(String... cols) {
		JTable ret = new JTable(new DefaultTableModel( new Object[0][], cols));

		TableColumnModel columnModel = ret.getColumnModel();
		
		for (Enumeration<TableColumn> enu = columnModel.getColumns();enu.hasMoreElements();) {
			TableColumn tableColumn = enu.nextElement();
			tableColumn.setCellRenderer(new DefaultTableCellRenderer(){public Component getTableCellRendererComponent(JTable table,
						Object value, boolean isSelected, boolean hasFocus,
						int row, int column) {
				DefaultTableCellRenderer comp = (DefaultTableCellRenderer) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
				if (value instanceof JLabel) {
					JLabel label = (JLabel) value;
					comp.setText(label.getText());
					if (!isSelected) {
						comp.setBackground(label.getBackground());
						comp.setForeground(label.getForeground());
					}
				}
				return comp;
			}});
			tableColumn.setCellEditor(new DefaultCellEditor(new JTextField()){

				@Override
				public Component getTableCellEditorComponent(JTable table,
						Object value, boolean isSelected, int row, int column) {
					JTextField comp = (JTextField) super.getTableCellEditorComponent(table, value, isSelected, row, column);
					if (value instanceof JLabel) {
						JLabel label = (JLabel) value;
						comp.setText(label.getText());
					}
					return comp;
				}
				
			});
		}
		
		return ret;
	}