This week's book giveaway is in the Spring forum. We're giving away four copies of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 and have Marten Deinum & Iuliana Cosmina on-line! See this thread for details.
Can any body tell me how to specify multiple cell editor on a single column of a JTable. i.e I want to use JTextField to edit cell indexed at(1,2)...JCombobox to edit cell indexed at(2,2)...JLabel to edit cell at(3,2)...what should i do to Code it???
I just did this (I think my method is kind of a hack, but it works). I created another column in the table that holds the celleditor (drop down box or JText field) and I overrode the getCellEditor method to return the one that is in the adjacent column. Of course you want to remove this column from the table before displaying it.
If you know before hand what cells require what types of editor, you could also just do a switch/if statement to return the right editor.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop