Is there a Java Swing component similar to "..."-Buttons in PL/SQL Developer? -
i want add button jtable. when button clicked, contents of corresponding cell should shown in new jtextarea. in pl/sql developer there such button, can see here:
clickable :
edit: tried this:
public class testkonfigtablecellrenderer extends defaulttablecellrenderer { @override public component gettablecellrenderercomponent(jtable table, object value, boolean isselected, boolean hasfocus, int row, int column) { jlabel l = (jlabel) super.gettablecellrenderercomponent(table, value, isselected, hasfocus, row, column); jbutton openbutton = new jbutton("..."); l.add(openbutton); return l; } }
but doesn't seem work. did wrong ?
if "it not seem work", mean cannot click on button, expected.
the component returned renderer not added swing hierarchy. instead, painted representation used in table performance reasons. reason typical renderer returns same component after updating state. see "concept: renderers , editors" section in jtable
tutorial more information.
there number of posts available on how include clickable button in jtable
. example this one.
Comments
Post a Comment