J
Jason Cavett
I want to place a button within a JTextField (at the far right). I'm
easily able to put images and other things in the JTextField by
overriding paint(Graphics), but I can't seem to insert a component.
(For the record, I'm extending JTextField.)
Does anybody have any suggestions? I can't find any good information
in my searches, and I'm somewhat stuck.
Thanks
P.S. I do realize I could just create a panel (or, rather, extend
JPanel) and place a JTextField on it and a button right next to it,
but I want button to be part of the component because developers may
still want to use the JTextField's methods. I could do an adapter to
all the JTextField's methods, but that seems like a waste of time, and
a bit confusing to the user of my component.
easily able to put images and other things in the JTextField by
overriding paint(Graphics), but I can't seem to insert a component.
(For the record, I'm extending JTextField.)
Does anybody have any suggestions? I can't find any good information
in my searches, and I'm somewhat stuck.
Thanks
P.S. I do realize I could just create a panel (or, rather, extend
JPanel) and place a JTextField on it and a button right next to it,
but I want button to be part of the component because developers may
still want to use the JTextField's methods. I could do an adapter to
all the JTextField's methods, but that seems like a waste of time, and
a bit confusing to the user of my component.