viernes, 18 de abril de 2014

ComboBox

Swing - JComboBox

l control JComboBox permite seleccionar un String de una lista.
Para inicializar los String que contendrá el JComboBox debemos llamar al método addItem tantas veces como elementos queremos cargar.
Un evento muy útil con este control es cuando el operador selecciona un Item de la lista. Para capturar la selección de un item debemos implementar la interface ItemListener que contiene un método llamada itemStateChanged.

Problema 1:

Cargar en un JComboBox los nombres de varios colores. Al seleccionar alguno mostrar en la barra de título del JFrame el String seleccionado.
JComboBox

Programa:

import javax.swing.*;
import java.awt.event.*;
public class Formulario extends JFrame implements ItemListener{
    private JComboBox combo1;
    public Formulario() {
        setLayout(null);
        combo1=new JComboBox();
        combo1.setBounds(10,10,80,20);
        add(combo1);
        combo1.addItem("rojo");
        combo1.addItem("vede");
        combo1.addItem("azul");
        combo1.addItem("amarillo");
        combo1.addItem("negro");
        combo1.addItemListener(this);
    }

    public void itemStateChanged(ItemEvent e) {
        if (e.getSource()==combo1) {
            String seleccionado=(String)combo1.getSelectedItem();
            setTitle(seleccionado);
        }
    }
    
    public static void main(String[] ar) {
        Formulario formulario1=new Formulario();
        formulario1.setBounds(0,0,200,150);
        formulario1.setVisible(true);
    }    
}
Indicamos a la clase que implementaremos la interface ItemListener:
public class Formulario extends JFrame implements ItemListener{
Declaramos un objeto de la clase ComboBox:
    private JComboBox combo1;
En el constructor creamos el objeto de la clase JComboBox:
        combo1=new JComboBox();
Posicionamos el control:
        combo1.setBounds(10,10,80,20);
Añadimos el control al JFrame:
        add(combo1);
Añadimos los String al JComboBox:
        combo1.addItem("rojo");
        combo1.addItem("vede");
        combo1.addItem("azul");
        combo1.addItem("amarillo");
        combo1.addItem("negro");
Asociamos la clase que capturará el evento de cambio de item (con this indicamos que esta misma clase capturará el evento):
        combo1.addItemListener(this);
El método itemStateChanged que debemos implementar de la interface ItemListener tiene la siguiente sintaxis:
    public void itemStateChanged(ItemEvent e) {
        if (e.getSource()==combo1) {
            String seleccionado=(String)combo1.getSelectedItem();
            setTitle(seleccionado);
        }
    }
Para extraer el contenido del item seleccionado llamamos al método getSelectemItem() el cual retorna un objeto de la clase Object por lo que debemos indicarle que lo transforme en String:
            String seleccionado=(String)combo1.getSelectedItem();

Problema 2:

Disponer tres controles de tipo JComboBox con valores entre 0 y 255 (cada uno representa la cantidad de rojo, verde y azul). Luego al presionar un botón pintar el mismo con el color que se genera combinando los valores de los JComboBox.
JComboBox

Programa:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Formulario extends JFrame implements ActionListener{
    private JLabel label1,label2,label3;
    private JComboBox combo1,combo2,combo3;
    private JButton boton1;
    public Formulario() {
        setLayout(null);
        label1=new JLabel("Rojo:");
        label1.setBounds(10,10,100,30);
        add(label1);
        combo1=new JComboBox();
        combo1.setBounds(120,10,50,30);
        for(int f=0;f<=255;f++) {
            combo1.addItem(String.valueOf(f));
        }
        add(combo1);
        label2=new JLabel("Verde:");
        label2.setBounds(10,50,100,30);
        add(label2);
        combo2=new JComboBox();
        combo2.setBounds(120,50,50,30);
        for(int f=0;f<=255;f++) {
            combo2.addItem(String.valueOf(f));
        }
        add(combo2);
        label3=new JLabel("Azul:");
        label3.setBounds(10,90,100,30);
        add(label3);
        combo3=new JComboBox();
        combo3.setBounds(120,90,50,30);
        for(int f=0;f<=255;f++) {
            combo3.addItem(String.valueOf(f));
        }
        add(combo3);
        boton1=new JButton("Fijar Color");
        boton1.setBounds(10,130,100,30);
        add(boton1);
        boton1.addActionListener(this);
    }

    public void actionPerformed(ActionEvent e) {
        if (e.getSource()==boton1) {
            String cad1=(String)combo1.getSelectedItem();
            String cad2=(String)combo2.getSelectedItem();
            String cad3=(String)combo3.getSelectedItem();
            int rojo=Integer.parseInt(cad1);
            int verde=Integer.parseInt(cad2);
            int azul=Integer.parseInt(cad3);
            Color color1=new Color(rojo,verde,azul);
            boton1.setBackground(color1);
        }
    }
    
    public static void main(String[] ar) {
        Formulario formulario1=new Formulario();
        formulario1.setBounds(0,0,400,300);
        formulario1.setVisible(true);
    }    
}
Importamos el paquete java.awt ya que el mismo contiene la clase Color:
import java.awt.*;
Implementaremos la interface ActionListener ya que tenemos que cambiar el color del botón cuando se lo presione y no haremos actividades cuando cambiemos items de los controles JComboBox:
public class Formulario extends JFrame implements ActionListener{
Definimos los siete objetos requeridos en esta aplicación:
    private JLabel label1,label2,label3;
    private JComboBox combo1,combo2,combo3;
    private JButton boton1;
En el constructor creamos los objetos, primero el control label1 de la clase JLabel:
        label1=new JLabel("Rojo:");
        label1.setBounds(10,10,100,30);
        add(label1);
Lo mismo hacemos con el objeto combo1:
        combo1=new JComboBox();
        combo1.setBounds(120,10,50,30);
Para añadir los 256 elementos del JComboBox disponemos un for y previa a llamar al método addItem convertimos el entero a String:
        for(int f=0;f<=255;f++) {
            combo1.addItem(String.valueOf(f));
        }
        add(combo1);
En el método actionPerformed cuando detectamos que se presionó el botón procedemos a extraer los tres item seleccionados:
    public void actionPerformed(ActionEvent e) {
        if (e.getSource()==boton1) {
            String cad1=(String)combo1.getSelectedItem();
            String cad2=(String)combo2.getSelectedItem();
            String cad3=(String)combo3.getSelectedItem();
Los convertimos a entero:
            int rojo=Integer.parseInt(cad1);
            int verde=Integer.parseInt(cad2);
            int azul=Integer.parseInt(cad3);
y creamos finalmente un objeto de la clase Color, el constructor de la clase Color requiere que le pasemos tres valores de tipo int:
            Color color1=new Color(rojo,verde,azul);
Para cambiar el color de fondo del control JButton debemos llamar al método setBackground y pasarle el objeto de la clase Color:


descargar driver por nombre de dispositivo

descargar driver por nombre de dispositivo
Knowledge Base
Frequently Asked Questions

Search

WD SES driver download and instructions for recovering the WD SmartWare installer

Answer ID 5419   |    Last Updated 04/16/2013
<-- -->
IMPORTANT
Important:

DESCARGAR DRIVER POR ID DE HARDWARE

descargar driver por id hardware

* The Utility doesn't need to be installed. DevID Agent can be easily run, it will found out
which devices need to install or update drivers.
The Utility doesn't contain viruses or malicious code

Super Flower, a renowned Chinese designer of PC enclosures and other hardware components, has introduced a new power supply unit, entitled Leadex Platinum 850 W (codename: SF-850F-14MP). The model is housed in a stylish white case and features a large air fan with a ventilation grid. It is targeting high-end systems with fastidious requirements to power supply. In order to prove the model’s durability, the manufacturer adds 5-year’s limited warranty to the shipping contents.



Super Flower Leadex Platinum 850 W has been awarded 80Plus Platinum certificate, due to more than 89% efficiency. The PSU comes with a totally modular cabling system and a set of wires for the simultaneous employment of two graphics cards. The model is cooled down by a single 140 mm fan, monitored by PWM controller.


This power supply unit is equipped with a single +12V rail that is able to provide 70.8 A current. It might operate in networks with the voltage range from 100 V to 240 V. The product …
Gigabyte has replenished its line of mini-ITX motherboards with a new remarkable model: the GA-E2100N. The product is targeting the segment of small-sized desktops or home media systems. It is based on AMD Kabini platform for Socket AM1 and equipped with AMD E1-2100 SoC with passive cooling solution. Featuring 170x170 mm, the board offers the whole range of facilities any modern full-sized model avails.



The integrated into Gigabyte GA-E2100N chip comes with an in-built Radeon HD 8210 graphics core with the support for DirectX 11.1 standard and with 1 MB of L2 cache. The chip operates at 1 GHz frequency, consuming not more than 9 W power. SoC is accompanied by two slots for the installation of up to 32 GB DDR3 memory modules with the maximal frequency of 1333 MHz.


The PCB is designed according to Gigabyte Ultra Durable 4 Plus template. It presumes the employment of high-quality components serving to protect the system from humidity, electrostatic discharge, voltage …
Announced several months ago, Chieftec Navitas series of PSUs has managed to win the hearts of PC enthusiasts in many areas across the globe. Unlike the majority lineups where the junior model features 450/550 W power, Navitas offers 650 W GPM-650C as the first model in the line to satisfy the needs of fastidious customers. Upon the whole, the series counts five models of 650 W, 750 W, 850 W, 1000 W, and 1250 W power. Let’s see whether the junior representative of the series deserves universal acclaim.



Basic Specs and Connectors


Chieftec Navitas 650 W is delivered in a gray cardbox that contains its basic specifications. The unit is able to gain up to 648 W power on +12VDC rail efficiency. The correlation of efficiency on +12VDC rail and an overall power makes up 0.997 points. The model itself is housed in a gray case with large texture coating. Its layout might boast the incorporation of a high-voltage Nippon Chemi-Con capacitor and as much as efficient Capxon …
Asus has unveiled one more non-trivial proprietary creation: VN289QL monitor. The new-comer features 660x556x247 mm dimensions (with stand) and 28-inch VA panel. Despite a stylish design, the model offers a quite useful Eye Care option. It is called to dramatically reduce eye fatigue on prolonged working sessions, due to the enforcement of stable backlit functioning and decrease of blue light emissions.



Asus VN289QL supports Full HD resolution and features the whole range of specifications each hi-end monitor should have: 16:9 aspect ratio, 5 ms response time, high static and dynamic contract – 3000:1/80M:1 correspondingly, widest viewing angles – 178/178 degrees V/H, and highest brightness – 300 cd/m2. The assemblage of such non-trivial features provides for an unbelievable viewing experience thanks to high-quality imaging.


The monitor comes with a pair of 2W speakers and an enlarged set of external interfaces, including two audio ports, one DVI-D, one D-Sub, one …
PowerColor has recently launched the most powerful in AMD’s Radeon series graphics card, entitled Radeon R9 295X2. The key peculiarity of the model is the availability of two GPUs, which are accompanied by a hybrid cooling system. Such remarkable specifications make the card an ideal solution for advanced gamers and overclocking enthusiasts.



PowerColor Radeon R9 295X2 employs PCI-e 3.0 x16 interface and incorporates a pair of AMD Hawaii XT GPUs (28 nm, GCN 2.0). Each processor features 2816 CUDA cores, 64 ROPs, and 176 TMUs. They operate at the maximal 1018 MHz clock frequency. Each GPU ‘cooperates’ with 4 GB GDDR5 memory (8 GB in total) with 512-bit rails. Its nominal clock frequency makes up 1250 MHz, whereas efficient frequency might reach up 5000 MHz.


This remarkable graphics card is furnished with a hybrid cooler. Both GPUs are taken care by a liquid-cooling solution of enclosed type, power circuits are taken care by air cooling. The latter consists of a fan …
LaCie, a reputable French manufacturer of premium storage devices, has updated its award-winning NAS, codenamed LaCie 5big, filling it with a bunch of cutting-edge options. The greenhorn is targeting corporate field and intended at a problem-free data backup, 4K video editing, joint and remote access to data, etc. The storage is housed in a solid aluminum chassis and counts five drive bays. Nonetheless, it features 173x220x196 mm dimensions only, which makes it the most compact NAS with the largest storage capacity in the market.



LaCie 5big will be available in three versions with the maximal capacity of 10 TB, 20 TB and 30 TB. The most outstanding peculiarity pertained to the model is the support of high-speed Thunderbolt 2 interface, represented by two ports. Initially, the storage presupposes the integration of five 6 TB hard drives, designed by Seagate, with the 7200 RPM spindle operation.


All the drives might be joined into RAID 5 configuration for a better …
Antec, a well-known designer of multiple hardware solutions, has released a new budgetary chassis, codenamed GX500. The model is developed in mid-tower form-factor and features 205x476x458 mm dimensions. It is made of solid steel but is complemented by plastic patches. The case has got a totally black coating and minimum accessories. The customers are able to acquire the product for the recommended price tag of EUR 59.



Antec GX500 supports the integration of standard ATX, as well as detracted mini-ITX and micro-ATX motherboards. The internal layout is ready to accommodate two 5.25-inch drives, five 2.5/3.5-inch drives, and seven PCI expansion cards. Storage might be enlarged due to the availability of one more external 3.5-inch drive bay.


Spacing within the chassis is sufficient to pack ATX power supply unit, CPU cooler of 158 mm in height, graphics adapters of 380 mm in length, and heatspreaders (liquid-cooling) of 380 mm in length. The chassis’ exterior does not …
Sapphire Technology Ltd., the first-string supplier of graphics cards based on AMD chips, introduces its proprietary version of Radeon R9 290 adapter – R9 290 Vapor-X OC. As seen from the title, the model features an original Vapor-X cooler with three low-noise fans and has received factory overclocking. Bright design and outstanding performance makes this card a desirable acquirement for enthusiasts and overclockers.



Sapphire R9 290 Vapor-X OC is based on Hawaii PRO GPU (28 nm, GCN architecture) with 2560 stream processors. It runs at 1030 MHz frequency. The chip is accompanied by 4 GB of GDDR5 memory (512-bit interface) that operates at 5600 MHz effective frequency. The card is developed for PCI Express 3.0 x16 rail and is powered through a pair of sockets: 1x 8-pin and 1x 6-pin.


The award-winning Vapor-X cooler consists of an evaporator and five heatpipes. The main heat-pipe features 10 mm diameter, two other – 8 mm, and the last two – 6 mm. This combination is …
Palit has officially claimed that a long-awaited kick-off of GeForce GTX 780 JetStream graphics card with 6 GB memory will take place in mid-April. The model is differentiated not only the doubled video memory capacity, but also by the incorporation of an offbeat three-slot cooling system and factory overclocking. The privileges offered by the card will be available for the customers with about €600 in their pockets.



Palit GeForce GTX 780 JetStream 6 GB is based on GK110-300-A1 GPU with 2304 CUDA cores, 48 ROPs, and 192 TMUs. The core operates at the basic 902 MHz frequency, still it might be overclocked to 954 MHz level. The implemented GDDR5 modules employ 384-bit bus and run at an effective 6 GHz frequency (1.5 GHz nominal index).


Power supply is delivered through one 8-pin socket and one 6-pin socket. The estimated TDP level makes up 250 W. Video connectivity is realized by means of four dedicated ports: HDMI 1.4a, DisplayPort 1.2, DL DVI-I, DL DVI-D. In addition, …
Rambler's Top100 

Como encontrar e instalar un driver especifico correcto por su ID

Sobreescribir un método @overrides, protected y super. Tutorial 15 Progr...

jueves, 10 de abril de 2014

Sitio de iconos

descargar Iconos
&lt;p&gt;Your browser does not support iframes.&lt;/p&gt;
&lt;p&gt;Your browser does not support iframes.&lt;/p&gt;

Free Icon iconos Carpeta de Java

Tamaño de archivo: 0.12 MB
Autor: Mattahan (Paul Davey) Folder Java icon in Um. Available size : 256x256, 128x128, 96x96, 72x72, 64x64, 48x48, 32x32, 16x16 in png format. Tags: Um, folder, java, coffee, drink, meal, food
Tags: Um folder java coffee drink meal food
&lt;p&gt;Your browser does not support iframes.&lt;/p&gt;

java Se cierran toda la aplicacion al cerrar una ventana java(mejorado)

plantillas grid Java

Personalización de un JTable en Java 

Personalización de un JTable en Java  

Autor : Rolando Palermo Rodríguez Cruz on martes, 27 de marzo de 2012 | 3/27/2012

El JTable es un componente del API Swing de Java para desplegar datos en dos dimensiones. Este componente que está desarrollado bajo el patrón MVC (como el resto de componentes de Java Swing) presenta un modelo y un renderizador los cuales se encargan de mostrar los registros de una forma determinanda, sin embargo en muchas de nuestras aplicaciones queremos personalizar los datos mostrados por lo que se hace necesario escribir nuestras propias clases para renderizar y gestionar la información que queremos mostrar. A lo largo de este artículo les mostraré la forma de cómo hacerlo con unos cuantos sencillos pasos.
Lo primero que debemos hacer es crearnos un proyecto en Netbeans nombrándolo como mejor nos paresca. Luego crear un paquete que en nuestro caso le hemos llamado com.blogspot.rolandopalermo.bean y a continuación crear en ese mismo paquete una clase Cliente tal como se muestra en la figura a continuación:

Y el código de esta clase debe quedar como se muestra  a continuación:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package com.blogspot.rolandopalermo.bean;
 
/**
 *
 * @author Rolando
 */
public class Cliente {
 
    private int id;
    private int edad;
    private String nombre;
    private String nombreEmpresa;
    private String nombreContacto;
    private String direccion;
 
    public Cliente(int id, int edad, String nombre, String nombreEmpresa, String nombreContacto, String direccion) {
        this.id = id;
        this.edad = edad;
        this.nombre = nombre;
        this.nombreEmpresa = nombreEmpresa;
        this.nombreContacto = nombreContacto;
        this.direccion = direccion;
    }
 
    public String getDireccion() {
        return direccion;
    }
 
    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }
 
    public int getEdad() {
        return edad;
    }
 
    public void setEdad(int edad) {
        this.edad = edad;
    }
 
    public int getId() {
        return id;
    }
 
    public void setId(int id) {
        this.id = id;
    }
 
    public String getNombre() {
        return nombre;
    }
 
    public void setNombre(String nombre) {
        this.nombre = nombre;
    }
 
    public String getNombreContacto() {
        return nombreContacto;
    }
 
    public void setNombreContacto(String nombreContacto) {
        this.nombreContacto = nombreContacto;
    }
 
    public String getNombreEmpresa() {
        return nombreEmpresa;
    }
 
    public void setNombreEmpresa(String nombreEmpresa) {
        this.nombreEmpresa = nombreEmpresa;
    }
}

Ahora debemos crear una JFrame el cuál se encargará de contener tanto a nuestra tabla como al resto de nuestros componentes Swing de nuestra aplicación. Creamos el JFrame VentanaPrincipal.java como se muestra en el figura siguiente:

Es el turno de nuestro modelo, quién se encargá de manejar las propiedades de tabulación de nuestra tabla  Para esto creamos la clase TablaModeloCliente como se muestra en la figura:
Y su código respectivo:

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.blogspot.rolandopalermo.gui;
 
import com.blogspot.rolandopalermo.bean.Cliente;
import java.util.ArrayList;
import java.util.List;
import javax.swing.table.AbstractTableModel;
 
/**
 *
 * @author Rolando
 */
public class TablaModeloCliente extends AbstractTableModel {
 
    private String[] columnNames = {"DNI", "Nombre", "Edad", "Dirección", "Empresa", "Contacto"};
    private List<cliente> clientes = new ArrayList<cliente>();
 
    public void agregarCliente(Cliente cliente) {
        clientes.add(cliente);
        fireTableDataChanged();
    }
 
    public void eliminarCliente(int rowIndex) {
        clientes.remove(rowIndex);
        fireTableDataChanged();
    }
     
    public void limpiarClientes() {
        clientes.clear();
        fireTableDataChanged();
    }
 
    @Override
    public String getColumnName(int columnIndex) {
        return columnNames[columnIndex];
    }
 
    @Override
    public int getRowCount() {
        return clientes.size();
    }
 
    @Override
    public int getColumnCount() {
        return 6;
    }
 
    @Override
    public Object getValueAt(int rowIndex, int columnIndex) {
        switch (columnIndex) {
            case 0:
                return clientes.get(rowIndex).getId();
            case 1:
                return clientes.get(rowIndex).getNombre();
            case 2:
                return clientes.get(rowIndex).getEdad();
            case 3:
                return clientes.get(rowIndex).getDireccion();
            case 4:
                return clientes.get(rowIndex).getNombreEmpresa();
            case 5:
                return clientes.get(rowIndex).getNombreContacto();
            default:
                return null;
        }
    }
 
    @Override
    public Class getColumnClass(int columnIndex) {
//        return getValueAt(0, columnIndex).getClass();
        return String.class;
    }
 
    @Override
    public boolean isCellEditable(int rowIndex, int columnIndex) {
        return false;
    }
 
    @Override
    public void setValueAt(Object value, int rowIndex, int columnIndex) {
        Cliente cliente = clientes.get(rowIndex);
        switch (columnIndex) {
            case 0:
                cliente.setId((Integer) value);
            case 1:
                cliente.setNombre((String) value);
            case 2:
                cliente.setEdad((Integer) value);
            case 3:
                cliente.setDireccion((String) value);
            case 4:
                cliente.setNombreEmpresa((String) value);
            case 5:
                cliente.setNombreContacto((String) value);
        }
        fireTableCellUpdated(rowIndex, columnIndex);
    }
}

Y para renderizar los datos en la grilla, crearemos la clase TablaRenderizadorCliente la cuál determinará las propiedades gráficas y el comportamiento gráfico de las celdas que van a componer la tabla.

Lo que debemos hacer es implementar la interfaz TableCellRenderer.
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.blogspot.rolandopalermo.gui;
 
import java.awt.Color;
import java.awt.Component;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;
 
/**
 *
 * @author Rolando
 */
public class TablaRenderizadorCliente implements TableCellRenderer {
 
    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        JLabel etiqueta = new JLabel();
        etiqueta.setOpaque(true);
        if (row % 2 == 0) {
            etiqueta.setBackground(new Color(255, 255, 200));
        } else {
            etiqueta.setBackground(Color.white);
        }
        if (column == 1) {
            String nombre = (String) value;
            etiqueta.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
            if (nombre.startsWith("#")) { //Hombre
                etiqueta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/blogspot/rolandopalermo/recursos/user.png"))); // NOI18N
            } else if (nombre.startsWith("&")) { //Mujer
                etiqueta.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/blogspot/rolandopalermo/recursos/user2.png"))); // NOI18N
            }
            etiqueta.setText(value.toString().substring(1, nombre.length()));
        } else {
            etiqueta.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            etiqueta.setText(value.toString());
        }
        if (isSelected) {
            etiqueta.setBackground(new Color(151, 193, 215));
        }
        return etiqueta;
    }
}

Con esto ya deberiamos tener la tabla como se muestra en la siguiente figura:

Para establecer el modelo y el renderizador a nuestra tabla deberíamos hacer lo siguiente:

?
1
2
3
4
TablaModeloCliente modelo = new TablaModeloCliente();
TablaRenderizadorCliente renderizador = new TablaRenderizadorCliente();
tablaClientes.setModel(modelo);
tablaClientes.setDefaultRenderer(String.class, renderizador);

Y para finalizar les dejo el enlace del proyecto para descargar.

Photobucket